[fixinc patch] Reduce bogus applications of limits_ifndefs

Nathanael Nerode neroden@twcny.rr.com
Wed Jul 9 21:06:00 GMT 2003


Bruce, per your comment, this is what I committed.  I moved the select
earlier and added a comment just so as to prevent confusion by people 
like me who find the default second arg a little confusing. :-)

	* inclhack.def (limits_ifndefs): Add select test.
	* fixincl.x: Rebuild.

Index: inclhack.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
retrieving revision 1.160
diff -u -r1.160 inclhack.def
--- inclhack.def	9 Jul 2003 21:00:01 -0000	1.160
+++ inclhack.def	9 Jul 2003 21:02:44 -0000
@@ -1609,12 +1609,13 @@
     hackname = limits_ifndefs;
     files  = "sys/limits.h";
     files  = "limits.h";
+    select = "^[ \t]*#[ \t]*define[ \t]+"
+             "((FLT|DBL)_(MIN|MAX|DIG))[ \t].*";
     bypass = "ifndef[ \t]+FLT_(MIN|MAX)";
 
     c_fix     = format;
     c_fix_arg = "#ifndef %1\n%0\n#endif";
-    c_fix_arg = "^[ \t]*#[ \t]*define[ \t]+"
-                "((FLT|DBL)_(MIN|MAX|DIG))[ \t].*";
+    /* Second arg is select expression */
     test_text = " #\tdefine\tDBL_DIG \t 0  /* somthin' */";
 };
 

-- 
Nathanael Nerode  <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html



More information about the Gcc-patches mailing list