Citation:
4.5 Integral promotions
1 An rvalue of type char, signed char, unsigned char, short int, or unsigned short int can be converted to
an rvalue of type int if int rvalue can be converted to an rvalue of type int if int can represent all the values of the
source type; otherwise, the source rvalue can be converted to an rvalue of type unsigned int.
2 An rvalue of type wchar_t (3.9.1) can be converted to an rvalue of the first of the following types that can represent
all the values of its underlying type: int, unsigned int, long, orint, unsigned long int, long long int, or
unsigned long long int. An rvalue of an enumeration type (7.2) can be converted to an rvalue of the first of the
following types that can represent all the values of the enumeration (i.e. the values in the range bmin to bmax as described
in 7.2: int, unsigned int, long, orint, unsigned long int, long long int, or unsigned long long int.
3 An rvalue for an integral bit-field (9.6) can be converted to an rvalue of type int if int can represent all the values of the
bit-field; otherwise, it can be converted to unsigned int if unsigned int can represent all the values of the bit-field.
If the bit-field is larger yet, no integral promotion applies to it. If the bit-field has an enumerated type, it is treated as any
other value of that type for promotion purposes.
4 An rvalue of type bool can be converted to an rvalue of type int, with false becoming zero and true becoming one.
5 These conversions are called integral promotions.
4.6 Floating point promotion [conv.fpprom]
1 An rvalue of type float can be converted to an rvalue of type double. The value is unchanged.
2 This conversion is called floating point promotion.
Citation:
9 Many binary operators that expect operands of arithmetic or enumeration type cause conversions and yield result types
in a similar way. The purpose is to yield a common type, which is also the type of the result. This pattern is called the
usual arithmetic conversions, which are defined as follows:
— If either operand is of type long double, the other shall be converted to long double.
— Otherwise, if either operand is double, the other shall be converted to double.
— Otherwise, if either operand is float, the other shall be converted to float.
— Otherwise, the integral promotions (4.5) shall be performed on both operands.59)
— Then if either operand is unsigned long long int, the other shall be converted to unsigned long long int.
— Otherwise, if one operand is long long int and the other unsigned long int or unsigned int, then if a
long long int can represent all the values of the unsigned operand type, the unsigned operand shall be converted
to long long int; otherwise both operands shall be converted to unsigned long long int.
— Otherwise, if either operand is long long int, the other shall be converted to long long int.
— Otherwise, if either operand is unsigned long the other shall be converted to unsigned long.
— Otherwise, if one operand is a long int and the other unsigned int, then if a long int can represent all the
values of an unsigned int, the unsigned int shall be converted to a long int otherwise both operands shall
be converted to unsigned long int.
— Otherwise, if either operand is long, the other shall be converted to long.
— Otherwise, if either operand is unsigned, the other shall be converted to unsigned.
[ Note: otherwise, the only remaining case is that both operands are int —end note ]