This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/34454] [4.3 regression] Overflow check is optimized away when -O2 is enabled



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]