5.7.3.10 Unsigned-bitfields Option
The -funsigned-bitfields
option control the signedness
of a plain int
bit-field type.
By default, the plain int
type, when used as the type
of a bit-field, is equivalent to signed int
. This option specifies the
type that will be used by the compiler for plain int
bit-fields. Using
the -funsigned-bitfields
or the -fno-signed-bitfields
option forces a plain int
to be unsigned.
Consider explicitly stating the signedness of bit-fields when they are
defined, rather than relying on the type assigned to a plain int
bit-field type.