------- Comment #6 from schwab at linux-m68k dot org 2009-04-13 07:53 ------- (In reply to comment #4) > But your test program does cause signed overflow
No, it doesn't. There is a conversion (from int to short) where the value is not representable by the target type, but that is _not_ undefined, but rather implementation-defined, and GCC has chosen to define the conversion as modulo operation. There is no room for GCC to behave differently. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39736