...
Bit-fields can be used to allow flags or other integer values with small ranges to be packed together to save storage space. When used in structure members, bit Bit-fields can improve the storage efficiency of structures. Compilers typically allocate consecutive bit-field structure members into the same int
-sized storage, as long as they fit completely into that storage unit. However, the order of allocation within a storage unit is implementation-defined. Some implementations are "right-to-left": the first member occupies the low-order position of the storage unit. Others are "left-to-right": the first member occupies the high-order position of the storage unit. Calculations that depend on the order of bits within a storage unit may produce different results on different implementations.
...
In this non-compliant example, assuming eight bits to a byte, if bit-fields of six and four bits are declared, is each bitfield bit-field contained within a byte or are they be split across multiple bytes?
...
In the above example, if each bitfield bit-field lives within its own byte, then m2 (or m1, depending on alignment) is incremented by 1. If the bitfields bit-fields are indeed packed across 8-bit bytes, then m2 might be incremented by 4.
...