This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fixincludes patch] Make broken_cabs match more generously
- From: neroden at twcny dot rr dot com (Nathanael Nerode)
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 1 Aug 2003 18:46:31 -0400
- Subject: Re: [fixincludes patch] Make broken_cabs match more generously
This is what I committed.
* inclhack.def (broken_cabs): Make matching more generous.
* fixincl.x: Regenerate.
* tests/base/math.h: Regenerate to match test_text change.
Index: inclhack.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
retrieving revision 1.169
diff -u -r1.169 inclhack.def
--- inclhack.def 31 Jul 2003 23:33:08 -0000 1.169
+++ inclhack.def 1 Aug 2003 22:45:39 -0000
@@ -783,21 +783,25 @@
* This conflicts with C99. Discovered on AIX.
* SunOS4 has its cabs() declaration followed by a comment which
* terminates on the following line.
+ * Darwin hides its broken cabs in architecture-specific subdirs.
*/
fix = {
hackname = broken_cabs;
- files = "math.h";
- select = '^extern[ \t]+double[ \t]+cabs';
+ files = "math.h";
+ files = "architecture/ppc/math.h";
+ files = "architecture/i386/math.h";
+ select = '^extern[ \t]+double[ \t]+cabs';
c_fix = format;
c_fix_arg = "";
- c_fix_arg = "^extern[ \t]+double[ \t]+cabs\\((struct dbl_hypot|)\\);";
+ c_fix_arg = "^extern[ \t]+double[ \t]+cabs[ \t]*\\([^\\)]*\\);";
test_text = "#ifdef __STDC__\n"
"extern double cabs(struct dbl_hypot);\n"
"#else\n"
"extern double cabs();\n"
"#endif\n"
+ "extern double cabs ( _Complex z );\n"
"extern double cabs(); /* This is a comment\n"
" and it ends here. */";
};
--
Nathanael Nerode <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html