http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50922
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org --- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-10-31 10:18:29 UTC --- (In reply to comment #4) > Am 30.10.11 20:14, schrieb pinskia at gcc dot gnu.org: > > --- Comment #3 from Andrew Pinski<pinskia at gcc dot gnu.org> 2011-10-30 > > 19:14:49 UTC --- > > Signed integer overflow is undefined so this is invalid. > > > If this is true, shouldnt the compiler give an error message or at least > a warning? > But I think incrementing is always well defined, even when overflowing. > And in the example the result after occuring the overflow is not > used anyway. http://gcc.gnu.org/wiki/FAQ#signed_overflow