summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pragma-ep-3.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/testsuite/gcc.dg/pragma-ep-3.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/testsuite/gcc.dg/pragma-ep-3.c')
-rw-r--r--gcc/testsuite/gcc.dg/pragma-ep-3.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pragma-ep-3.c b/gcc/testsuite/gcc.dg/pragma-ep-3.c
new file mode 100644
index 00000000000..95b38bc584b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pragma-ep-3.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target alpha*-*-osf5* } */
+/* { dg-final { scan-assembler ",Xfoo" } } */
+
+#pragma extern_prefix "X"
+void foo(void) __attribute__((noreturn));
+void foo(void) __attribute__((noreturn));
+void bar()
+{
+ foo();
+}