https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94631

--- Comment #8 from Rich Felker <bugdal at aerifal dot cx> ---
OK, I think it's in 6.3.1.1 Boolean, characters, and integers, ΒΆ2, but somewhat
poorly worded:

"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.
- A bit-field of type _Bool, int, signed int, or 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."

The first sentence with second bullet point suggests it should behave as
unsigned int, but the "as restricted by the width, for a bit-field" in the
paragraph after after the bulleted list seems to confirm your interpretation.

Reply via email to