Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Integer types smaller than int are promoted when an operation is performed on them. If all values of the original type can be represented as an int, the value of the smaller type is converted to an int; otherwise, it is converted to an unsigned int. Integer promotions are applied as part of the usual arithmetic conversions to certain argument expressions, operands of the unary {+}, -, and {~} operators, and operands of the shift operators. The following code fragment shows the application of integer promotions:

...