[M3devel] the meaning of -FIRST(INTEGER)?

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Fri Jan 29 15:32:50 CET 2010


On Sun, Jan 24, 2010 at 05:38:30PM -0500, Tony Hosking wrote:
> But a given implementation (as in all of the implementations we currently support) can assume integer overflow is OK and also a 2-s complement representation.  What's the problem?

If the compiler can determine statically that an overflow will happen, 
and the overflow cause incorrect behaviour of the program, it just 
might be helpful to inform him.

But I wouldn't go so far as to say it's a problem.  It would be a 
problem for him to be unable to get overflow checking even if he's 
willing to pay the run-time cost.  But that wasn't what I was talking 
about.

-- hendrik

> 
> Antony Hosking | Associate Professor | Computer Science | Purdue University
> 305 N. University Street | West Lafayette | IN 47907 | USA
> Office +1 765 494 6001 | Mobile +1 765 427 5484
> 
> 
> 
> 
> On 24 Jan 2010, at 08:16, hendrik at topoi.pooq.com wrote:
> 
> > On Sun, Jan 24, 2010 at 04:24:05AM -0500, Tony Hosking wrote:
> >> Agreed.  If we allow overflow at run-time we should at compile-time.
> > 
> > But perhaps a compile-time warning is in order for overflow -- in cases 
> > where we do the arithmetic at compile-time, anyway.  We may avoid 
> > run-time checks for speed reasons, but there's no such constraint 
> > on compile-time checks.
> > 
> > -- hendrik
> 



More information about the M3devel mailing list