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]

RE: [fixinc patch] Reduce bogus applications of limits_ifndefs


> 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' */";
>  };


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