位域的符号Sign of Bit Fields

ANSI 3.5.2.1“纯”int 域被视为 signed int 位域还是 unsigned int 位域ANSI 3.5.2.1 Whether a "plain" int field is treated as a signed int bit field or as an unsigned int bit field

位域可以带符号也可以不带符号。Bit fields can be signed or unsigned. 纯位域被视为带符号的。Plain bit fields are treated as signed.

另请参阅See Also

结构、联合、枚举和位域Structures, Unions, Enumerations, and Bit Fields