This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [CFT] solaris and tru64 renaming pragmas
Richard Henderson writes:
> Here's a replacement for the c-pragma.c part of the patch
> that should address this problem.
With that patch, the bootstrap on alpha-dec-osf5.1 completed without
regressions. A couple of problems, though:
c-decl.c and cp/decl.c should include c-pragma.h to avoid these new warnings:
gcc/c-decl.c: In function `finish_decl':
gcc/c-decl.c:3627: warning: implicit declaration of function `maybe_apply_renaming_pragma'
gcc/c-decl.c:3627: warning: assignment makes pointer from integer without a cast
gcc/cp/decl.c: In function `cp_finish_decl':
gcc/cp/decl.c:8067: warning: implicit declaration of function `maybe_apply_renaming_pragma'
gcc/cp/decl.c:8067: warning: assignment makes pointer from integer without a cast
Initially both gcc.dg tests failed:
gcc/testsuite/gcc.dg/pragma-ep-1.c:26: ISO C forbids initialization between function pointer and `void *'
gcc/testsuite/gcc.dg/pragma-ep-1.c:26: ISO C forbids initialization between function pointer and `void *'
gcc/testsuite/gcc.dg/pragma-ep-1.c:26: ISO C forbids initialization between function pointer and `void *'
gcc/testsuite/gcc.dg/pragma-ep-1.c:27: ISO C forbids initialization between function pointer and `void *'
FAIL: gcc.dg/pragma-ep-2.c (test for excess errors)
Excess errors:
gcc/testsuite/gcc.dg/pragma-ep-2.c:6: ISO C forbids an empty source file
This patch fixes both and lets both tests pass:
--- /homes/ro/pragma-ep-1.c Thu Mar 21 21:31:20 2002
+++ pragma-ep-1.c Thu Mar 21 21:13:54 2002
@@ -22,6 +22,6 @@
extern int four(void);
-void *p[] = {
+int (*p[]) (void) = {
one, two, three, four
};
--- /homes/ro/pragma-ep-2.c Thu Mar 21 21:31:26 2002
+++ pragma-ep-2.c Thu Mar 21 21:20:30 2002
@@ -3,3 +3,5 @@
#pragma extern_prefix /* { dg-warning "malformed" } */
#pragma extern_prefix foo /* { dg-warning "malformed" } */
#pragma extern_prefix "foo" 1 /* { dg-warning "junk" } */
+
+int bar; /* silence `ISO C forbids an empty source file' warning */
Rainer