This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.
   */



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]