This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [fixinc patch] Reduce bogus applications of limits_ifndefs
- From: Bruce Korb <bkorb at ellen dot veritas dot com>
- To: gcc-patches at gcc dot gnu dot org, Nathanael Nerode <neroden at twcny dot rr dot com>
- Date: Wed, 09 Jul 2003 07:01:10 -0700
- Subject: RE: [fixinc patch] Reduce bogus applications of limits_ifndefs
- Reply-to: bkorb at ellen dot veritas dot com
> Bruce, could you vet this?
The change looks reasonable, but I suggest this way.
No point in duplicating the expression.
> fix = {
> hackname = limits_ifndefs;
> files = "sys/limits.h";
> files = "limits.h";
> 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]+"
> + select = "^[ \t]*#[ \t]*define[ \t]+"
> "((FLT|DBL)_(MIN|MAX|DIG))[ \t].*";
> test_text = " #\tdefine\tDBL_DIG \t 0 /* somthin' */";
> };