comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <jrcarter@acm.org>
Subject: Re: Static vs dynamic evaluation anomaly?
Date: Sat, 10 Feb 2007 05:22:33 GMT
Date: 2007-02-10T05:22:33+00:00	[thread overview]
Message-ID: <tEczh.1183254$084.97359@attbi_s22> (raw)
In-Reply-To: <Pine.LNX.4.58.0702092203350.24689@th.informatik.uni-mannheim.de>

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



  reply	other threads:[~2007-02-10  5:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <12shen4qjhv41a7@corp.supernews.com>
2007-02-06 19:17 ` Static vs dynamic evaluation anomaly? Jeffrey R. Carter
2007-02-06 20:01 ` Adam Beneschan
2007-02-06 20:15   ` Ludovic Brenta
2007-02-06 23:38     ` Matt.Jaffe
     [not found]     ` <12sipb529oilnab@corp.supernews.com>
2007-02-07 10:05       ` Ludovic Brenta
2007-02-07 21:54       ` Simon Wright
2007-02-09 12:39         ` GNAT's version Peter Hermann
2007-02-07  3:32   ` Static vs dynamic evaluation anomaly? Steve
2007-02-07 10:00     ` Ludovic Brenta
2007-02-07 10:21       ` Georg Bauhaus
2007-02-07 16:44         ` Adam Beneschan
2007-02-07 18:27           ` Jeffrey R. Carter
2007-02-07 18:55             ` Adam Beneschan
2007-02-07 21:52               ` Simon Wright
2007-02-08  0:48               ` Jeffrey R. Carter
2007-02-08  1:26                 ` Adam Beneschan
2007-02-08 18:44                   ` Jeffrey R. Carter
2007-02-09  7:57                     ` Stefan Lucks
2007-02-09 18:50                       ` Jeffrey R. Carter
2007-02-09 21:12                         ` Stefan Lucks
2007-02-10  5:22                           ` Jeffrey R. Carter [this message]
2007-02-10 12:29                             ` Ludovic Brenta
2007-02-08  6:57             ` Matt Jaffe
2007-02-08  9:01               ` Ludovic Brenta
2007-02-08 10:32                 ` Georg Bauhaus
2007-02-08 11:13                 ` Jean-Pierre Rosen
2007-02-08 13:02                   ` Ludovic Brenta
2007-02-07 21:46         ` Matt.Jaffe
2007-02-07  6:24   ` AW: " Grein, Christoph (Fa. ESG)
2007-02-07  6:59     ` Stefan Lucks
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox