[Bug middle-end/34454] [4.3 regression] Overflow check is optimized away when -O2 is enabled
ian at airs dot com
gcc-bugzilla@gcc.gnu.org
Thu Dec 13 20:37:00 GMT 2007
------- Comment #4 from ian at airs dot com 2007-12-13 20:37 -------
Note that this gives a warning with -Wstrict-overflow.
And note that you get the desired behaviour if you compile with
-fno-strict-overflow.
As Pinski says, the code is simply incorrect according to standard C, but you
can use the -Wstrict-overflow and -fno-strict-overflow options to help fix
existing code bases.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34454
More information about the Gcc-bugs
mailing list