diff options
author | Nathanael Nerode <neroden@gcc.gnu.org> | 2003-07-09 21:08:20 +0000 |
---|---|---|
committer | Nathanael Nerode <neroden@gcc.gnu.org> | 2003-07-09 21:08:20 +0000 |
commit | 15e4ea18d363c34ac79b4a63b8634c2444f0ef50 (patch) | |
tree | d231eccf5406bfdb7034dc1ec5841fce596a92f7 | |
parent | cd61dacbc8d810fd90b02f7687c3099deae8e2fe (diff) | |
download | gcc-15e4ea18d363c34ac79b4a63b8634c2444f0ef50.zip gcc-15e4ea18d363c34ac79b4a63b8634c2444f0ef50.tar.gz gcc-15e4ea18d363c34ac79b4a63b8634c2444f0ef50.tar.bz2 |
inclhack.def (limits_ifndefs): Add select test.
* fixinc/inclhack.def (limits_ifndefs): Add select test.
* fixinc/fixincl.x: Rebuild.
From-SVN: r69154
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/fixinc/fixincl.x | 18 | ||||
-rw-r--r-- | gcc/fixinc/inclhack.def | 5 |
3 files changed, 18 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8e3af25..4a342f3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2003-07-09 Nathanael Nerode <neroden@gcc.gnu.org> + * fixinc/inclhack.def (limits_ifndefs): Add select test. + * fixinc/fixincl.x: Rebuild. + * fixinc/inclhack.def (math_exception): Improve bypass and comment. * fixinc/fixincl.x: Rebuild. diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index 884f1e8..74f13be 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Wednesday July 9, 2003 at 04:58:23 PM EDT + * It has been AutoGen-ed Wednesday July 9, 2003 at 05:06:05 PM EDT * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Jul 9 16:58:23 EDT 2003 +/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Jul 9 17:06:05 EDT 2003 * * You must regenerate it. Use the ./genfixes script. * @@ -2830,14 +2830,21 @@ tSCC zLimits_IfndefsList[] = #define apzLimits_IfndefsMachs (const char**)NULL /* + * content selection pattern - do fix if pattern found + */ +tSCC zLimits_IfndefsSelect0[] = + "^[ \t]*#[ \t]*define[ \t]+((FLT|DBL)_(MIN|MAX|DIG))[ \t].*"; + +/* * content bypass pattern - skip fix if pattern found */ tSCC zLimits_IfndefsBypass0[] = "ifndef[ \t]+FLT_(MIN|MAX)"; -#define LIMITS_IFNDEFS_TEST_CT 1 +#define LIMITS_IFNDEFS_TEST_CT 2 static tTestDesc aLimits_IfndefsTests[] = { - { TT_NEGREP, zLimits_IfndefsBypass0, (regex_t*)NULL }, }; + { TT_NEGREP, zLimits_IfndefsBypass0, (regex_t*)NULL }, + { TT_EGREP, zLimits_IfndefsSelect0, (regex_t*)NULL }, }; /* * Fix Command Arguments for Limits_Ifndefs @@ -2847,7 +2854,6 @@ static const char* apzLimits_IfndefsPatch[] = { "#ifndef %1\n\ %0\n\ #endif", - "^[ \t]*#[ \t]*define[ \t]+((FLT|DBL)_(MIN|MAX|DIG))[ \t].*", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -6100,7 +6106,7 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 171 +#define REGEX_COUNT 172 #define MACH_LIST_SIZE_LIMIT 261 #define FIX_COUNT 154 diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index dda47b9..6fb0570 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -1609,12 +1609,13 @@ fix = { 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' */"; }; |