Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 99

...

Typically, converting an integer to a smaller type results in truncation of the high-order bits.

It is undefined behavior when conversion to an integer type produces a value outside the range that can be represented (6.3.1.4). See also undefined behavior 15 in C99 Annex J.

Noncompliant Code Example (Unsigned to Signed)

...