9.5.2 Bitfields in Structures
The MPLAB XC-DSC C Compiler fully supports bitfields in structures.
Bitfields are, by default, signed int
. They may be made
an unsigned int bitfield
by using a command line option (see the 6.6.3 Options for Controlling the C Dialect section).
The first bit defined will be the LSb of the word in which it will be stored.
The compiler supports bitfields with any bit size, up to the size of the underlying type. Any integral type can be made into a bitfield. The allocation does not normally cross a bit boundary natural to the underlying type.