re PR target/35054 (No documentation of #pragma push_macro("macro_name"))
PR 35054 * doc/extend.texi (Structure-Packing Pragmas): Replace "Win32" with the phrase "Microsoft Windows compilers". (Push/Pop Macro Pragmas): New subsection. Document #pragma push_macro and pragma pop_macro. From-SVN: r133161
This commit is contained in:
parent
5dea0c1939
commit
20cef83acc
2 changed files with 49 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-03-13 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
PR 35054
|
||||
* doc/extend.texi (Structure-Packing Pragmas): Replace "Win32"
|
||||
with the phrase "Microsoft Windows compilers".
|
||||
(Push/Pop Macro Pragmas): New subsection. Document
|
||||
#pragma push_macro and pragma pop_macro.
|
||||
|
||||
2008-03-12 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* config/arm/arm.c (output_move_double): Prefer LDRD to LDM.
|
||||
|
|
|
@ -10868,6 +10868,7 @@ for further explanation.
|
|||
* Weak Pragmas::
|
||||
* Diagnostic Pragmas::
|
||||
* Visibility Pragmas::
|
||||
* Push/Pop Macro Pragmas::
|
||||
@end menu
|
||||
|
||||
@node ARM Pragmas
|
||||
|
@ -11064,11 +11065,11 @@ way of knowing that that happened.)
|
|||
@node Structure-Packing Pragmas
|
||||
@subsection Structure-Packing Pragmas
|
||||
|
||||
For compatibility with Win32, GCC supports a set of @code{#pragma}
|
||||
directives which change the maximum alignment of members of structures
|
||||
(other than zero-width bitfields), unions, and classes subsequently
|
||||
defined. The @var{n} value below always is required to be a small power
|
||||
of two and specifies the new alignment in bytes.
|
||||
For compatibility with Microsoft Windows compilers, GCC supports a
|
||||
set of @code{#pragma} directives which change the maximum alignment of
|
||||
members of structures (other than zero-width bitfields), unions, and
|
||||
classes subsequently defined. The @var{n} value below always is required
|
||||
to be a small power of two and specifies the new alignment in bytes.
|
||||
|
||||
@enumerate
|
||||
@item @code{#pragma pack(@var{n})} simply sets the new alignment.
|
||||
|
@ -11183,6 +11184,41 @@ member or instantiation, you must use an attribute.
|
|||
|
||||
@end table
|
||||
|
||||
|
||||
@node Push/Pop Macro Pragmas
|
||||
@subsection Push/Pop Macro Pragmas
|
||||
|
||||
For compatibility with Microsoft Windows compilers, GCC supports
|
||||
@samp{#pragma push_macro(@var{"macro_name"})}
|
||||
and @samp{#pragma pop_macro(@var{"macro_name"})}.
|
||||
|
||||
@table @code
|
||||
@item #pragma push_macro(@var{"macro_name"})
|
||||
@cindex pragma, push_macro
|
||||
This pragma saves the value of the macro named as @var{macro_name} to
|
||||
the top of the stack for this macro.
|
||||
|
||||
@item #pragma pop_macro(@var{"macro_name"})
|
||||
@cindex pragma, pop_macro
|
||||
This pragma sets the value of the macro named as @var{macro_name} to
|
||||
the value on top of the stack for this macro. If the stack for
|
||||
@var{macro_name} is empty, the value of the macro remains unchanged.
|
||||
@end table
|
||||
|
||||
For example:
|
||||
|
||||
@smallexample
|
||||
#define X 1
|
||||
#pragma push_macro("X")
|
||||
#undef X
|
||||
#define X -1
|
||||
#pragma pop_macro("X")
|
||||
int x [X];
|
||||
@end smallexample
|
||||
|
||||
In this example, the definition of X as 1 is saved by @code{#pragma
|
||||
push_macro} and restored by @code{#pragma pop_macro}.
|
||||
|
||||
@node Unnamed Fields
|
||||
@section Unnamed struct/union fields within structs/unions
|
||||
@cindex struct
|
||||
|
|
Loading…
Add table
Reference in a new issue