--- Comment #3 from mat at lcs dot mit dot edu 2009-05-18 20:53 ---
Fair enough, thanks (this came up running a compiler test suite that checks
even undefined edge cases).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40189
--- Comment #2 from pinskia at gcc dot gnu dot org 2009-05-18 19:48 ---
INT_MIN + any number is never going to be zero because INT_MIN = - INT_MAX -1.
Also signed integer overflow is undefined which gives that the above.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40189
--- Comment #1 from schwab at linux-m68k dot org 2009-05-18 19:47 ---
Not a bug. If arg0 is negative you get undefined behavior due to overflow.
Use -fwrapv to get wrapping semantics.
--
schwab at linux-m68k dot org changed:
What|Removed |Added
-