-[no]bfield_reduce_type

Controls whether or not the compiler uses type-size reduction for bitfields.

Syntax
  -[no]bfield_reduce_type  
Default
  -bfield_reduce_type  
Defines
  __BITFIELD_TYPE_SIZE_REDUCTION__  
  __BITFIELD_NO_TYPE_SIZE_REDUCTION__  
Remarks

Type-size reduction means that the compiler can reduce the type of a bitfield from int to char if that bitfield fits into a character. Thus, memory will be allocated for a byte instead of an integer.

This option is equivalent to the pragma,

#pragma bfield_reduce_type on | off | reset

The following example demonstrates how this option works.

Listing: Example bfield_reduce_type
typedef struct {
long a: 4;

long b: 4;

} SomeStruct;

Assuming we initialize an instance of SomeStruct as below:

  SomeStruct s = {2,7};  

we get the following memory layouts for s:

  -bfield_reduce_type (default):   72         ( [b][a]] )  
  -nobfield_reduce_type        :   72 00 00   ( [b][a]] 
  [0|0|0|0|0|0|0|0] [0|0|0|0|0|0|0|0] )  

For more information, refer to the pragma bfield_reduce_type.