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-Thread: 103376,4eca860272d4832b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s21.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Static vs dynamic evaluation anomaly? 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> In-Reply-To: <1170874545.463017.180430@j27g2000cwj.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1170895705 12.201.97.213 (Thu, 08 Feb 2007 00:48:25 GMT) NNTP-Posting-Date: Thu, 08 Feb 2007 00:48:25 GMT Organization: AT&T ASP.att.net Date: Thu, 08 Feb 2007 00:48:25 GMT Xref: g2news2.google.com comp.lang.ada:9115 Date: 2007-02-08T00:48:25+00:00 List-Id: Adam Beneschan wrote: > > 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. What's happening (I think) is the base type is 8 bits. Without -gnato, there's no check to see if the result exceeds this and should be reduced mod the modulus, so an out-of-range value is produced. The output is always outputting an 8-bit value; with the check, this value always fits in 6 bits; without it, it may be larger. This may well be an error, possibly with Modular_IO. -- Jeff Carter "It's all right, Taggart. Just a man and a horse being hung out there." Blazing Saddles 34