The relevant bytes of the representation of the object are treated as an object of the type used for the access. See Type-punning. This may be a trap representation.
int
bit-field is treated as a signed int
bit-field or as an unsigned int
bit-field (C90 6.5.2, C90 6.5.2.1, C99 and C11 6.7.2, C99 and C11 6.7.2.1). By default it is treated as signed int
but this may be changed by the -funsigned-bitfields option.
_Bool
, signed int
, and unsigned int
(C99 and C11 6.7.2.1). Other integer types, such as long int
, and enumerated types are permitted even in strictly conforming mode.
Atomic types are not permitted for bit-fields.
Determined by ABI.
Determined by ABI.
Determined by ABI.
Normally, the type is unsigned int
if there are no negative values in the enumeration, otherwise int
. If -fshort-enums is specified, then if there are negative values it is the first of signed char
, short
and int
that can represent all the values, otherwise it is the first of unsigned char
, unsigned short
and unsigned int
that can represent all the values.
On some targets, -fshort-enums is the default; this is determined by the ABI.
Next: Qualifiers implementation, Previous: Hints implementation, Up: C Implementation [Contents][Index]
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Structures-unions-enumerations-and-bit-fields-implementation.html