bug-gnulib
[Top][All Lists]
Advanced

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

Re: GCC optimizes integer overflow: bug or feature?


From: Robert Dewar
Subject: Re: GCC optimizes integer overflow: bug or feature?
Date: Tue, 19 Dec 2006 06:37:01 -0500
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)

Florian Weimer wrote:
* Paolo Bonzini:

Interesting read.  I agree with the proposed fix; however, note that
GCC does not make the result of overflowing signed left-shifts
undefined, exactly because in this case the overflow is relied upon by
too many existing programs

Is this documented somewhere?  Without documentation, it could also be
an oversight (lack of optimization) from a programmer perspective.

It generally seems desirable for me to have a documentation section
which takes every undefined in the standard and says what is done
with it (sort of like Annex M in the documentation for an Ada compiler).





reply via email to

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