CODE GENERATION
Function
-BfaTSR[ON|OFF]
ON: Bit Field Type Size Reduction enabled
OFF: Bit Field Type-Size Reduction disabled
HC08: -BfaTSRON
__BITFIELD_TYPE_SIZE_REDUCTION__
__BITFIELD_NO_TYPE_SIZE_REDUCTION__
None
This option is available whether or not the compiler uses type-size reduction for bitfields. Type-size reduction means that the compiler reduces the type of an int bitfield to a char bitfield if the int bitfield fits into a character. Type-size reduction allows the compiler to allocate memory only for one byte instead of for an integer.
The following listings demonstrate the effects of -BfaTSRoff and -BfaTSRon, respectively.
struct{ long b1:4; long b2:4; } myBitfield; 31 7 3 0 -------------------------------- |########################|b2|b1| -BfaTSRoff --------------------------------
7 3 0 ---------- |b2 | b1 | -BfaTSRon ----------
-BfaTSRon