Commit 20cef83a by Danny Smith Committed by Danny Smith

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
parent 5dea0c19
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> 2008-03-12 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (output_move_double): Prefer LDRD to LDM. * config/arm/arm.c (output_move_double): Prefer LDRD to LDM.
......
...@@ -10868,6 +10868,7 @@ for further explanation. ...@@ -10868,6 +10868,7 @@ for further explanation.
* Weak Pragmas:: * Weak Pragmas::
* Diagnostic Pragmas:: * Diagnostic Pragmas::
* Visibility Pragmas:: * Visibility Pragmas::
* Push/Pop Macro Pragmas::
@end menu @end menu
@node ARM Pragmas @node ARM Pragmas
...@@ -11064,11 +11065,11 @@ way of knowing that that happened.) ...@@ -11064,11 +11065,11 @@ way of knowing that that happened.)
@node Structure-Packing Pragmas @node Structure-Packing Pragmas
@subsection Structure-Packing Pragmas @subsection Structure-Packing Pragmas
For compatibility with Win32, GCC supports a set of @code{#pragma} For compatibility with Microsoft Windows compilers, GCC supports a
directives which change the maximum alignment of members of structures set of @code{#pragma} directives which change the maximum alignment of
(other than zero-width bitfields), unions, and classes subsequently members of structures (other than zero-width bitfields), unions, and
defined. The @var{n} value below always is required to be a small power classes subsequently defined. The @var{n} value below always is required
of two and specifies the new alignment in bytes. to be a small power of two and specifies the new alignment in bytes.
@enumerate @enumerate
@item @code{#pragma pack(@var{n})} simply sets the new alignment. @item @code{#pragma pack(@var{n})} simply sets the new alignment.
...@@ -11183,6 +11184,41 @@ member or instantiation, you must use an attribute. ...@@ -11183,6 +11184,41 @@ member or instantiation, you must use an attribute.
@end table @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 @node Unnamed Fields
@section Unnamed struct/union fields within structs/unions @section Unnamed struct/union fields within structs/unions
@cindex struct @cindex struct
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment