comp.lang.ada
 help / color / mirror / Atom feed
From: "Eric G. Miller" <egm2@jps-nospam.net>
Subject: Re: Last stream problem: byte order
Date: Fri, 29 Mar 2002 02:08:32 GMT
Date: 2002-03-29T02:08:32+00:00	[thread overview]
Message-ID: <pan.2002.03.28.18.09.19.71051.18886@jps-nospam.net> (raw)
In-Reply-To: x7v663gczbb.fsf@smaug.pushface.org

In <x7v663gczbb.fsf@smaug.pushface.org>, Simon Wright wrote:

> "Eric G. Miller" <egm2@jps-nospam.net> writes:
> 
>> In <3CA20BAA.FD53C08A@ib-paus.com>, Dr. Michael Paus wrote:
> 
>> >       if System.Default_Bit_Order = System.Low_Order_First then
>> >          ... (swap the bytes)
>> >       else
>> >          ... (don't swap the bytes)
>> >       end if;
>> > 
>> > But I don't think this makes a big difference in either case.
>> 
>> GNAT gives a warning that the condition is always true (or false).
>> Don't know if it eliminates the unreachable branch (I would think so
>> with -02).  Resorting to preprocessing trickery would probably
>> insure it is always a compile time check.  Don't know if there's
>> another way...
> 
> I've just tried a similar code with 3.13p, 3,14a1 and 3.15a and none
> of them flagged a warning here .. with or without -O2.

gnatmake -g -gnatwa <foo>

Guess I forget to mention "if you turn on warnings...".



  reply	other threads:[~2002-03-29  2:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-25 19:45 Last stream problem: byte order Erik Sigra
2002-03-25 22:28 ` Jeffrey Carter
2002-03-25 22:36 ` Stephen Leake
2002-03-26  4:32 ` Eric G. Miller
2002-03-26 10:25 ` Dr. Michael Paus
2002-03-26 17:53   ` Pascal Obry
2002-03-26 18:25     ` Dr. Michael Paus
2002-03-26 19:25       ` Pascal Obry
2002-03-27 15:37   ` Erik Sigra
2002-03-27 18:12     ` Dr. Michael Paus
2002-03-28  2:24       ` Eric G. Miller
2002-03-28 18:34         ` Stephen Leake
2002-03-28 18:38         ` Simon Wright
2002-03-29  2:08           ` Eric G. Miller [this message]
2002-03-29  6:52             ` Simon Wright
2002-03-29  7:06               ` Simon Wright
replies disabled

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