bit fields are non portable and machine dependent.
Limitations of using bit fields
When using bit fields, be aware of the following issues:
- The code will be non-portable since the organization of
bits-within-bytes and bytes-within-words is machine dependent.
- You cannot take the address of a bit field; so the expression
&mystruct.x is illegal if x is a bit field identifier, because there
is no guarantee that mystruct.x lies at a byte address.
- Bit fields are used to pack more variables into a smaller data
space, but causes the compiler to generate additional code to
manipulate these variables. This costs in terms of code size and
execution time.