Namespaces
Variants
Actions

Talk:c/language/bit field

From cppreference.com

Section 6.7.2.1p5:

"A bit-field shall have a type that is a qualified or unqualified version of _Bool, signed int, unsigned int, or some other implementation-defined type."

This would mean that the part where this wiki talks about int being allowed and being of implementation-defined signed-ness is wrong...? -- DevSolar (talk) 07:17, 18 July 2018 (PDT)

The "plain" int used with bit-fields, unlike the "plain" char which is never identical to either signed char or unsigned char, shall be identical to signed int (as usual) or unsigned int. To which it is identical is implementation-defined. And it is never a distinct type. -- Fruderica (talk) 08:05, 18 July 2018 (PDT)