7.152 --signed_bitfields, --unsigned_bitfields

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.


The default is --unsigned_bitfields.


The AAPCS requirement for bitfields to default to unsigned on ARM, is relaxed in version 2.03 of the standard.


typedef int integer;
    integer x : 1;
} bf;
Compiling this code with --signed_bitfields causes xto be treated as a signed bitfield.
Related information
Procedure Call Standard for the ARM Architecture
Non-ConfidentialPDF file icon PDF versionARM DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.