Is char default-promoted?

First, default argument promotions

6.5.2.2

If the expression that denotes the called function has a
type that does not include a prototype, the integer promotions
are performed on each argument
, and arguments that have type float
are promoted to double. These are called the default argument
promotions
.

Now for integer promotions:

6.3.1.1

The following may be used in an expression wherever an int or unsigned
int may be used:

  • An object or expression with an integer type (other than int or
    unsigned int) whose integer conversion rank is less than or
    equal to the rank of int and unsigned int.

If an int can represent all values of the original type (as restricted
by the width, for a bit-field), the value is converted to an int;
otherwise, it is converted to an unsigned int. These are called the
integer promotions.

So for C at least a char is default-promoted to int or unsigned int.

Leave a Comment