Next: , Previous: , Up: Variable Attributes   [Contents][Index]


6.34.15 x86 Variable Attributes

Two attributes are currently defined for x86 configurations: ms_struct and gcc_struct.

ms_struct
gcc_struct

If packed is used on a structure, or if bit-fields are used, it may be that the Microsoft ABI lays out the structure differently than the way GCC normally does. Particularly when moving packed data between functions compiled with GCC and the native Microsoft compiler (either via function call or as data in a file), it may be necessary to access either format.

The ms_struct and gcc_struct attributes correspond to the -mms-bitfields and -mno-ms-bitfields command-line options, respectively; see x86 Options, for details of how structure layout is affected. See x86 Type Attributes, for information about the corresponding attributes on types.