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 18:08:31 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!rcn!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail From: "Eric G. Miller" Subject: Re: Last stream problem: byte order Newsgroups: comp.lang.ada Message-ID: References: <3CA04CA6.338B37D7@ib-paus.com> <3CA20BAA.FD53C08A@ib-paus.com> User-Agent: Pan/0.11.2 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Comment-To: "Simon Wright" Date: Fri, 29 Mar 2002 02:08:32 GMT NNTP-Posting-Host: 216.119.44.213 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1017367712 216.119.44.213 (Thu, 28 Mar 2002 18:08:32 PST) NNTP-Posting-Date: Thu, 28 Mar 2002 18:08:32 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:21804 Date: 2002-03-29T02:08:32+00:00 List-Id: In , Simon Wright wrote: > "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. gnatmake -g -gnatwa Guess I forget to mention "if you turn on warnings...".