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!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!attbi_s22.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> <1170897971.419567.78410@a34g2000cwb.googlegroups.com> <2cKyh.337215$FQ1.333812@attbi_s71> In-Reply-To: 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_s22 1171084953 12.201.97.213 (Sat, 10 Feb 2007 05:22:33 GMT) NNTP-Posting-Date: Sat, 10 Feb 2007 05:22:33 GMT Organization: AT&T ASP.att.net Date: Sat, 10 Feb 2007 05:22:33 GMT Xref: g2news2.google.com comp.lang.ada:9221 Date: 2007-02-10T05:22:33+00:00 List-Id: Stefan Lucks wrote: > > The only kind of defense on the side of the compiler writer I can still > imagine is that gnat without the -gnato option isn't an Ada compiler, but > rather a compiler for a language with an Ada syntax but a non-Ada > semantic. Well, yes, the crux of the matter is that without -gnato, the compiler is not inserting certain checks. The argument I could see being used would be something like: When the result of the multiplication is not in the range of the type, the value "overflows" into the unused bits of the base type. With -gnato, that overflow is detected and corrected as required by the language. Without it, the overflow goes undetected and you get the results you have posted. As I said, I think this is an error, since the ARM says that values are taken mod the modulus for the type, not that they're taken mod the modulus when they "overflow" the range of the type. I think someone has posted here that they're reporting this as an error; it will be interesting to see the response. -- Jeff Carter "Sheriff murdered, crops burned, stores looted, people stampeded, and cattle raped." Blazing Saddles 35