http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49183
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-05-27 01:43:29 UTC --- assert(i+10>i) is always true if i is signed as signed integer overflow is undefined. If i is MAX_INT then i+10 will overflow and the result is undefined, so GCC assumes that the result will never be less than i. If you want signed integer to be defined as wrapping use -fwrapv.