autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."


From: Joe Buck
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: Sat, 30 Dec 2006 22:48:59 -0800
User-agent: Mutt/1.4.1i

On Sat, Dec 30, 2006 at 09:52:24PM -0800, Paul Eggert wrote:
> Wait, though: K&Rv2 is post-C89.  If memory serves, it was C89
> that established the rule that signed integer overflow has
> undefined behavior whereas unsigned overflow is well-defined.

I don't have the original K&R book so can't tell you for sure what it
said, but I wrote C in the early 80s.  unsigned was always defined to obey
the rules of arithmetic modulo 2**NBITS and I'm sure a statement to that
effect was included, because I remember being impressed and thankful; up
to then, I'd had great difficulty doing anything tricky with integers in
Fortran, which is what I'd been using up until then.  The behavior of
signed integral types on overflow was not specified, though I vaguely
recall some complaints that you couldn't build v7 Unix if your compiler
generated integer overflow traps.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]