Integer promotion implicitly replaces a narrow integer with a wider integer before arithmetic is evaluated. In ordinary C implementations, char, _Bool, and short values become signed int values of the same value, regardless of their original signedness. section 5.2
Promotion inside a small expression
#include <stdbool.h>\n#include <stdio.h>\n\nint main(void) {\n char c = 3;\n _Bool ready = true;\n short count = 4;\n\n printf("%d %d %d\\n", c + 1, ready + 1, count + 1);\n}\n\nBefore each addition, the narrow operand is promoted, so these expressions are evaluated using signed int values. The resulting arithmetic values can then be passed to printf. section 5.2 section 18.1.2
Keep these promotion rules in view:
- Arithmetic does not operate directly on narrow integer types; promotion occurs first. section 5.2
- Promotion belongs to a larger family of conversions that also determines common types for binary arithmetic. section 18.1.2
- Do not confuse promotion with every later conversion: -1 + 1U promotes the signed operand first, then converts it to unsigned before addition. section 18.1.2
Table 5.1 Base types according to the four main type classes. Types with a gray background don’t allow for arithmetic; they are promoted before doing arithmetic. Type char is special since it can behave like unsigned or signed, depending on the platform. All types in this table are considered to be distinct types, even if they have the same class and precision.
| Class | Systematic name | Other name | Rank | |
|---|---|---|---|---|
| Integers | Unsigned | bool | _Bool | 0 |
unsigned char | 1 | |||
unsigned short | 2 | |||
unsigned int | unsigned | 3 | ||
unsigned long | 4 | |||
unsigned long long | 5 | |||
| [Un]signed | char | 1 | ||
| Signed | signed char | 1 | ||
signed short | short | 2 | ||
signed int | signed or int | 3 | ||
signed long | long | 4 | ||
signed long long | long long | 5 | ||
| Floating point | Real | float | ||
double | ||||
long double | ||||
| Complex | float _Complex | float complex | ||
double _Complex | double complex | |||
long double _Complex | long double complex | |||
Use the base-type table to distinguish narrow types that require promotion from wider types used directly in arithmetic, while noting char's platform-dependent signedness. section 5.2

