4.6.1 Integral Promotion
Integral promotion is always applied in accordance with the C standard, but it can confuse those who are not expecting such behavior.
When there is more than one operand to an operator, they typically must be of exactly
the same type. The compiler will automatically convert the operands, if necessary, so
they do have the same type. The conversion is to a “larger” type so there is no loss of
information; however, the change in type can cause different code behavior to what is
sometimes expected. These form the standard type conversions.
Prior to these type conversions, some operands are unconditionally converted to a
larger type, even if both operands to an operator have the same type. This conversion
is called integral promotion. The compiler performs these integral promotions where
required, and there are no options that can control or disable this operation.
Integral promotion is the implicit conversion of enumerated types, signed or
unsigned varieties of char, short int or bit-field types to either signed int or
unsigned int. If the result of the conversion can be represented by an signed int,
then that is the destination type, otherwise the conversion is to unsigned int.