summaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-22 22:51:48 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-22 22:51:48 +0000
commitea42c4de227309f4db936eae29f35e7b20a7353e (patch)
treeef58fdf21cd2d5af8fcc1fdca3da41897a87502f /gcc/cp/decl.c
parent92ec37e132679f46e77d77ea490053326041ccc9 (diff)
downloadgcc-ea42c4de227309f4db936eae29f35e7b20a7353e.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51200 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index fcc87fed1ff..06c82ab232a 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8071,6 +8071,8 @@ cp_finish_decl (decl, init, asmspec_tree, flags)
}
/* If a name was specified, get the string. */
+ if (current_binding_level == global_binding_level)
+ asmspec_tree = maybe_apply_renaming_pragma (decl, asmspec_tree);
if (asmspec_tree)
asmspec = TREE_STRING_POINTER (asmspec_tree);