6.35. Type Attributes

6.35.1. i386 Type Attributes

Two attributes are currently defined for i386 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 packs them differently than GCC would normally pack them. 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.

Currently -m[no-]ms-bitfields is provided for the Windows X86 compilers to match the native Microsoft compiler.

To specify multiple attributes, separate them by commas within the double parentheses: for example, __attribute__ ((aligned (16),packed)).