aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorRichard Henderson <rth@gcc.gnu.org>2002-03-22 14:51:48 -0800
committerRichard Henderson <rth@gcc.gnu.org>2002-03-22 14:51:48 -0800
commit41c643948c237b94330e47ff9f860206ebb816c2 (patch)
treeef58fdf21cd2d5af8fcc1fdca3da41897a87502f /gcc/doc
parent661fff62a918df093c952e14a1656f0e151c137a (diff)
downloadgcc-41c643948c237b94330e47ff9f860206ebb816c2.zip
gcc-41c643948c237b94330e47ff9f860206ebb816c2.tar.gz
gcc-41c643948c237b94330e47ff9f860206ebb816c2.tar.bz2
c-pragma.c (maybe_apply_renaming_pragma): New.
* c-pragma.c (maybe_apply_renaming_pragma): New. (handle_pragma_redefine_extname, pending_redefine_extname): New. (handle_pragma_extern_prefix, pragma_extern_prefix): New. (init_pragma): Register them. * c-pragma.h (maybe_apply_renaming_pragma): Declare. * c-decl.c (finish_decl): Call it. * cp/decl.c (cp_finish_decl): Likewise. * doc/extend.texi: Document the new pragmas. * config/alpha/osf.h (CPP_SUBTARGET_SPEC): Add __EXTERN_PREFIX. (HANDLE_PRAGMA_EXTERN_PREFIX): New. * config/i386/sol2.h (CPP_PREDEFINES): Add __PRAGMA_REDEFINE_EXTNAME. (HANDLE_PRAGMA_REDEFINE_EXTNAME): New. * config/sparc/sol2.h: Likewise. * g++.dg/other/pragma-re-1.C: New. * g++.dg/other/pragma-ep-1.C: New. * gcc.dg/pragma-re-1.c, gcc.dg/pragma-re-2.c: New. * gcc.dg/pragma-ep-1.c, gcc.dg/pragma-ep-2.c: New. * gcc.dg/pragma-ep-3.c: New. From-SVN: r51200
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 59297d2..f1f499d 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -5998,6 +5998,8 @@ for further explanation.
@menu
* ARM Pragmas::
* Darwin Pragmas::
+* Solaris Pragmas::
+* Tru64 Pragmas::
@end menu
@node ARM Pragmas
@@ -6062,6 +6064,44 @@ that of the @code{unused} attribute, except that this pragma may appear
anywhere within the variables' scopes.
@end table
+@node Solaris Pragmas
+@subsection Solaris Pragmas
+
+For compatibility with the SunPRO compiler, the following pragma
+is supported.
+
+@table @code
+@item redefine_extname @var{oldname} @var{newname}
+@cindex pragma, redefine_extname
+
+This pragma gives the C function @var{oldname} the assembler label
+@var{newname}. The pragma must appear before the function declaration.
+This pragma is equivalent to the asm labels extension (@pxref{Asm
+Labels}). The preprocessor defines @code{__PRAGMA_REDEFINE_EXTNAME}
+if the pragma is available.
+@end table
+
+@node Tru64 Pragmas
+@subsection Tru64 Pragmas
+
+For compatibility with the Compaq C compiler, the following pragma
+is supported.
+
+@table @code
+@item extern_prefix @var{string}
+@cindex pragma, extern_prefix
+
+This pragma renames all subsequent function and variable declarations
+such that @var{string} is prepended to the name. This effect may be
+terminated by using another @code{extern_prefix} pragma with the
+empty string.
+
+This pragma is similar in intent to to the asm labels extension
+(@pxref{Asm Labels}) in that the system programmer wants to change
+the assembly-level ABI without changing the source-level API. The
+preprocessor defines @code{__EXTERN_PREFIX} if the pragma is available.
+@end table
+
@node Unnamed Fields
@section Unnamed struct/union fields within structs/unions.
@cindex struct