aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorDouglas B Rupp <rupp@gnat.com>2003-01-09 05:23:55 +0000
committerDouglas Rupp <rupp@gcc.gnu.org>2003-01-09 05:23:55 +0000
commitfe77449a165426dfd6793158bc15204736ddd783 (patch)
treeb72f87fe5a93707fed09664a945fd2d2b191832f /gcc/doc
parent984179689f29e1a1d257e1aa63bdaca9c0ec89b2 (diff)
downloadgcc-fe77449a165426dfd6793158bc15204736ddd783.zip
gcc-fe77449a165426dfd6793158bc15204736ddd783.tar.gz
gcc-fe77449a165426dfd6793158bc15204736ddd783.tar.bz2
i386.c (ix86_attribute_table): Add new attributes ms_struct and gcc_struct.
* config/i386/i386.c (ix86_attribute_table): Add new attributes ms_struct and gcc_struct. (ix86_handle_struct_attribute): New function. (ix86_ms_bitfield_layout_p): Update to take new attributes into account. * doc/extend.texi: Document new attributes. * testsuite/gcc.dg/bf-ms-attrib.c: New test. From-SVN: r61072
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi40
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index cb7a0a3..26817b0 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -3212,6 +3212,26 @@ Medium and large model objects may live anywhere in the 32-bit address space
(the compiler will generate @code{seth/add3} instructions to load their
addresses).
+@subsection i386 Variable Attributes
+
+Two attributes are currently defined for i386 configurations:
+@code{ms_struct} and @code{gcc_struct}
+
+@item ms_struct
+@itemx gcc_struct
+@cindex @code{ms_struct}
+@cindex @code{gcc_struct}
+
+If @code{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 @option{-m[no-]ms-bitfields} is provided for the Windows X86
+compilers to match the native Microsoft compiler.
+
@end table
To specify multiple attributes, separate them by commas within the
@@ -3471,6 +3491,26 @@ If you replaced @code{short_a} with @code{short} in the variable
declaration, the above program would abort when compiled with
@option{-fstrict-aliasing}, which is on by default at @option{-O2} or
above in recent GCC versions.
+
+@subsection i386 Type Attributes
+
+Two attributes are currently defined for i386 configurations:
+@code{ms_struct} and @code{gcc_struct}
+
+@item ms_struct
+@itemx gcc_struct
+@cindex @code{ms_struct}
+@cindex @code{gcc_struct}
+
+If @code{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 @option{-m[no-]ms-bitfields} is provided for the Windows X86
+compilers to match the native Microsoft compiler.
@end table
To specify multiple attributes, separate them by commas within the