25.3.15 The Allocation Order of Bit-Field

The memory ordering of bit-fields into their storage unit is not specified by the C Language Standard. In the CCI, the first bit defined is the least significant bit (LSb) of the storage unit in which it is allocated.

Example

The following shows a structure containing bit-fields being defined.
struct {
        unsigned lo  : 1;
        unsigned mid :6;
        unsigned hi  : 1;
} foo;

The bit-field lo is assigned the least significant bit of the storage unit assigned to the structure foo. The bit-field mid is assigned the next 6 least significant bits, and hi, the most significant bit of that same storage unit byte.

Differences

This is identical with the previous operation of all compilers.

Migration to the CCI

No action required.