2.1.107. --[un]signed_bitfields

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.


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 to be treated as a signed bitfield.

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A