http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49820
--- Comment #13 from Agner Fog <agner at agner dot org> 2011-07-26 19:31:48 UTC --- My example does indeed give a warning when compiled with -Wstrict-overflow=2. Unfortunately, -Wall implies only -Wstrict-overflow=1 so I got no warning in the first place. I think the warning levels need to be adjusted so that we get the warning with -Wall because the consequences are no less serious than ignoring an overflow check with if(a+const<a), which gives a warning with -Wstrict-overflow=1