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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4eca860272d4832b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!feeder.news-service.com!216.196.110.148.MISMATCH!border1.nntp.ams.giganews.com!nntp.giganews.com!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!news.highwinds-media.com!xara.net!gxn.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Static vs dynamic evaluation anomaly? Date: Wed, 07 Feb 2007 21:52:51 +0000 Organization: Pushface Message-ID: References: <12shen4qjhv41a7@corp.supernews.com> <1170792077.235994.10900@q2g2000cwa.googlegroups.com> <87d54mguco.fsf@ludovic-brenta.org> <1170843700.7656.47.camel@localhost.localdomain> <1170866664.465875.309930@v45g2000cwv.googlegroups.com> <1170874545.463017.180430@j27g2000cwj.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 1170885170 7655 62.49.19.209 (7 Feb 2007 21:52:50 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 7 Feb 2007 21:52:50 +0000 (UTC) Cancel-Lock: sha1:SBcTMPT/bpbWZBGhQAkGYIuofXs= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news2.google.com comp.lang.ada:9099 Date: 2007-02-07T21:52:51+00:00 List-Id: "Adam Beneschan" writes: > On Feb 7, 10:27 am, "Jeffrey R. Carter" wrote: >> Adam Beneschan wrote: >> >> > Yes, it does make a difference. It appears that I'm using version >> > 4.0.0. When I use -gnato, I get the correct results; when I use - >> > gnatp, or no flag, I get incorrect results (Text_IO displays values >> > greater than 63, same as what Matt was seeing). >> >> This is a known issue. GNAT is not Ada without -gnato and -fstack-check. > > Seems like a pretty lame excuse, though. Ada does have a Suppress > pragma to suppress checks; as I understand the documentation, omitting > -gnato causes certain checks not to be performed, and using -gnatp > causes even more checks not to be performed, so the result should be > more or less equivalent to using Suppress. So it probably isn't > accurate to say that GNAT isn't Ada in that case, but that's perhaps a > matter of semantics. In any case, though, using Suppress, or not > using -gnato, or using -gnatp, shouldn't produce *different* results. > The most I would expect is that the behavior would be different in > cases where an exception would be raised if the check were performed--- > but I would not expect different behavior in a case where *no* > exception is raised. And in this case, no exception is raised---the > Put is outputting different values. So I still think this is a bug > that needs to be fixed. The current behavior (assuming that 4.1.1-22 > behaves the same as 4.0.0) isn't reasonable. -gnato makes GNAT check for integer overflow, so it is at least in the right area! I must say that I would have expected to get unsigned behaviour independent of -gnato, though (and don't forget the RTL isn't getting recompiled). Similar results with GNAT-GPL-2006 on G4 Mac, BTW.