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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f25e636d6b770960 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-28 11:15:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!pogner.demon.co.uk!zap!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Last stream problem: byte order Date: 28 Mar 2002 18:38:48 +0000 Organization: Pushface Message-ID: References: <3CA04CA6.338B37D7@ib-paus.com> <3CA20BAA.FD53C08A@ib-paus.com> NNTP-Posting-Host: localhost X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 X-Trace: news.demon.co.uk 1017342870 nnrp-14:21324 NO-IDENT pogner.demon.co.uk:158.152.70.98 X-Complaints-To: abuse@demon.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Date: 28 Mar 2002 18:38:48 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:21782 Date: 2002-03-28T18:38:48+00:00 List-Id: "Eric G. Miller" 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. You can use -gnatG to see the tree from which code is generated.