This option makes bitfields of type int signed
or unsigned.
The C Standard specifies that if the type specifier used in
declaring a bitfield is either int, or a typedef name
defined as int, then whether the bitfield is signed
or unsigned is dependent on the implementation.
Default
The default is --unsigned_bitfields.
Note
The AAPCS requirement for bitfields to default to unsigned
on ARM, is relaxed in version 2.03 of the standard.
Example
typedef int integer;
struct
{
integer x : 1;
} bf;
Compiling this code with --signed_bitfields causes
to be treated as a signed bitfield.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.