http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56600
Chung-Ju Wu <jasonwucj at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jasonwucj at gmail dot com --- Comment #3 from Chung-Ju Wu <jasonwucj at gmail dot com> 2013-03-16 11:44:03 UTC --- (In reply to comment #1) > Integer overflow is causing undefined behaviour. If you want wraparound > semantics either use unsigned int or -fwrapv. Hi, Hyun-Ho Kyeong, More information about such undefined behavior~ :) According to C99 standard: C99 6.3.1.4 Point 1: "... If the value of the integral part cannot be represented by the integer type, the behavior is undefined." C99 6.5 Point 5: "... if the result is ... not in the range of representable values for its type... the behavior is undefined."