J.2 lists the following as an instance of undefined behavior:
Conversion to or from an integer type produces a value outside the
range that can be represented (220.127.116.11).
This is incomplete and misleading. 18.104.22.168 discusses conversions
between floating-point and integer types; for such conversions, the
statement in J.2 is correct. But for a conversion from an integer
type to a signed integer type, an overflow either yields an
implementation-defined result or raises an implementation-defined
I think the quoted statement in J.2 just needs to mention
Credit goes to Richard Bos for noticing this, in the comp.lang.c
thread "Understanding a simple C program".
Keith Thompson (The_Other_Keith) XXXX@XXXXX.COM < http://www.yqcomputer.com/
San Diego Supercomputer Center <*> < http://www.yqcomputer.com/
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"