Red Hat Enterprise Linux 3: Using the GNU Compiler Collection (GCC) | ||
---|---|---|
Prev | Chapter 6. Extensions to the C Language Family | Next |
Two attributes are currently defined for i386 configurations: ms_struct and 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)).