diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2008-03-13 07:06:30 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@gcc.gnu.org> | 2008-03-13 07:06:30 +0000 |
commit | 20cef83acca722837e262ac90c4f5fce51559274 (patch) | |
tree | 35f3ef1a36b9567d4fd9325681d64d3422394e53 /gcc | |
parent | 5dea0c1939a51ebb53cab4466bd49f3f828f740d (diff) | |
download | gcc-20cef83acca722837e262ac90c4f5fce51559274.zip gcc-20cef83acca722837e262ac90c4f5fce51559274.tar.gz gcc-20cef83acca722837e262ac90c4f5fce51559274.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/doc/extend.texi | 46 |
2 files changed, 49 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d64295d..98dc171 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 9dbdc8e..5dfbbcf 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -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 |