This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch (to fixinc/inclhack.def) for PR 9244
- From: Krister Walfridsson <cato at df dot lth dot se>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 17 Feb 2003 20:46:21 +0100 (MET)
- Subject: Patch (to fixinc/inclhack.def) for PR 9244
PR 9244 notes that NetBSD has bogus semicolons in its header files
which makes the new C++ parser complain. This is fixed by the patch
below.
Bootstrapped and regression tested on i386-unknown-netbsdelf1.6
(that has the bogus header file) and i386-unknown-netbsdelf1.6L
(whose header files do not have this problem.)
OK to commit?
/Krister
2003-02-17 Krister Walfridsson <cato@df.lth.se>
* inclhack.def (netbsd_bogus_semicolon): New fix.
* fixincl.x: Rebuilt.
Index: fixinc/inclhack.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
retrieving revision 1.143
diff -c -r1.143 inclhack.def
*** fixinc/inclhack.def 14 Feb 2003 04:19:02 -0000 1.143
--- fixinc/inclhack.def 17 Feb 2003 19:35:09 -0000
***************
*** 1710,1715 ****
--- 1710,1731 ----
/*
+ * NetBSD has a semicolon after the ending '}' for some extern "C".
+ */
+ fix = {
+ hackname = netbsd_bogus_semicolon;
+ mach = *-*-netbsd*;
+ files = sys/cdefs.h;
+ select = "#define[ \t]*__END_DECLS[ \t]*};";
+
+ c_fix = format;
+ c_fix_arg = "#define __END_DECLS }";
+
+ test_text = "#define __END_DECLS }";
+ };
+
+
+ /*
* NeXT 3.2 adds const prefix to some math functions.
* These conflict with the built-in functions.
*/