http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49820

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-07-24 
09:40:57 UTC ---
(In reply to comment #8)
> Why is the behavior different for signed and unsigned?
> The expression (a + 5 < a) is reduced to always false when a is signed, but 
> not
> when a is unsigned. 

Because for unsigned, wrapping is the behavior for UINT_MAX +1.  As there is no
overflow for unsigned integer, a+5 can be less than a.

Reply via email to