3.6.3.7 Signed-bitfields Option
The -fsigned-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
-fsigned-bitfields
or the -fno-unsigned-bitfields
option forces a plain int
bit-field to be signed.
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.