From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,57b125b84ee7e254 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Avoiding warnings Date: Thu, 23 Feb 2006 20:05:28 +0000 Organization: Pushface Message-ID: References: <1140429906.386023.136460@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1140725125 1879 62.49.19.209 (23 Feb 2006 20:05:25 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 23 Feb 2006 20:05:25 +0000 (UTC) Cancel-Lock: sha1:EA5zfdpkFaQzXFGpZpIPLXf521M= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news1.google.com comp.lang.ada:3111 Date: 2006-02-23T20:05:28+00:00 List-Id: Stephen Leake writes: > "ada_wannabe" writes: > >> Hello everybody. Suppose we have the next code that converts data types >> between different architectures: >> >> procedure p1(..) >> begin >> ... >> if Standard'Default_Bit_Order=1 then >> ... >> else >> ... >> end p1; >> >> When I compile the source, the GNAT compiler gives me the next warning: >> >> warning: condition is always True >> >> How can I avoid this warning? > > Others have shown you how to avoid the warning, but they have not > pointed out that the warning is still correct; the 'else' clause of > this 'if' statement will _never_ be executed. Unless of course OP had been running on a Power Mac or a SPARC or ... where "condition is always False"!