This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
4.1 PATCH: Fix Tru64 UNIX #pragma extern_prefix testcase
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 10 Aug 2005 19:57:35 +0200 (MEST)
- Subject: 4.1 PATCH: Fix Tru64 UNIX #pragma extern_prefix testcase
Recently, g++.dg/other/pragma-ep-1.C started to fail on Tru64 UNIX V5.1B:
FAIL: g++.dg/other/pragma-ep-1.C (test for excess errors)
Excess errors:
/vol/gnu/src/gcc/gcc-dist/gcc/testsuite/g++.dg/other/pragma-ep-1.C:26: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
/vol/gnu/src/gcc/gcc-dist/gcc/testsuite/g++.dg/other/pragma-ep-1.C:26: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
/vol/gnu/src/gcc/gcc-dist/gcc/testsuite/g++.dg/other/pragma-ep-1.C:26: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
/vol/gnu/src/gcc/gcc-dist/gcc/testsuite/g++.dg/other/pragma-ep-1.C:26: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object
The following trivial patch fixes this.
Ok for mainline?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Tue Jun 28 22:17:28 2005 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* g++.dg/other/pragma-ep-1.C: Properly define p, remove
superfluous casts.
Index: testsuite/g++.dg/other/pragma-ep-1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/other/pragma-ep-1.C,v
retrieving revision 1.3
diff -u -p -r1.3 pragma-ep-1.C
--- testsuite/g++.dg/other/pragma-ep-1.C 24 Feb 2003 18:52:51 -0000 1.3
+++ testsuite/g++.dg/other/pragma-ep-1.C 10 Aug 2005 17:57:10 -0000
@@ -22,6 +22,6 @@ extern "C" int three(void);
extern "C" int four(void);
-void *p[] = {
- (void *) one, (void *) two, (void *) three, (void *) four
+int (*p[])(void) = {
+ one, two, three, four
};