HP C/iX Reference Manual (31506-90011)
148 Chapter9
HP C/iX Implementation Topics
Bit-Fields
Bit-Fields
• Bit-fields in structures are packed from left to right (high-order to low-order).
• The high order bit position of a "plain" integer bit-field is treated as a sign bit.
• Bit-fields of types char, short, long, and enum are allowed.
• The maximum size of a bit-field is 32 bits.
• If a bit-field is too large to fit in the current word, it is moved to the next word.
• The range of values in an integer bit-field are:
-2,147,483,648 to 2,147,483,647 for 32-bit signed quantities
0 to 4,294,967,295 for 32-bit unsigned quantities
• Bit-fields in unions are allowed only in ANSI mode.