comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Avoiding warnings
Date: Thu, 23 Feb 2006 20:05:28 +0000
Date: 2006-02-23T20:05:28+00:00	[thread overview]
Message-ID: <m2irr5denr.fsf@grendel.local> (raw)
In-Reply-To: uk6bnvwpp.fsf@toadmail.com

Stephen Leake <stephe_on_the_web@toadmail.com> writes:

> "ada_wannabe" <luis.sainz@gmail.com> 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"!



  reply	other threads:[~2006-02-23 20:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-20 10:05 Avoiding warnings ada_wannabe
2006-02-20 13:51 ` Justin Gombos
2006-02-21 21:32 ` Simon Wright
2006-02-22 22:45 ` Stephen Leake
2006-02-23 20:05   ` Simon Wright [this message]
2006-03-04  1:25   ` Brian.Gaffney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox