bitfields
Syntax
#pragma bitfields={disjoint_types|joined_types| reversed_disjoint_types|reversed|default}
Parameters
| Bitfield members are placed from the least significant bit to the most significant bit in the container type. Storage containers of bitfields with different base types will not overlap. |
| Bitfield members are placed depending on the byte order. Storage containers of bitfields will overlap other structure members. For more information, see Bitfields. This parameter is only available if you use the compiler option |
| Bitfield members are placed from the most significant bit to the least significant bit in the container type. Storage containers of bitfields with different base types will not overlap. |
| This is an alias for |
| Restores the default layout of bitfield members. If you use the compiler option |
Description
Use this pragma directive to control the layout of bitfield members.
Example
#pragma bitfields=disjoint_types
/* Structure that uses disjoint bitfield types. */
struct S
{
unsigned char error : 1;
unsigned char size : 4;
unsigned short code : 10;
};
#pragma bitfields=default /* Restores to default setting. */