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: Richard Kenner
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: Sat, 30 Dec 2006 20:54:23 EST

> Gaby said
> 
> K&R C leaves arithmetic overflow undefined (except for unsigned
> types), in the sense that you get whatever the underlying hardware
> gives you.  If it traps, you get trapped.  If it wraps, you get wrapped.
> 
> Is that really what the K&R book says, or just what compilers typically
> did? My memory is that the K&R book leaves it undefined period, but it's
> a long time since I read it!

I found my copy of K&R (Second Edition).  Page 200: "The handling of overflow,
divide check, and other exceptions in expression evaluation is not defined
by the language.  Most existing implementations of C ignore overflow in
evaluation of signed integral expressions and assignments, but this behavior
is not guaranteed."




reply via email to

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