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: [fixincludes patch] Make broken_cabs match more generously


Nathanael Nerode wrote:
> 
> This'll match *anything* inside the pair of parentheses (except for
> more parentheses).
> 
> Looks happy enough.  Andrew, does this fix the Darwin problem reported
> against tree-ssa?
> 
> Bruce, is this OK for mainline?

When Andrew says it fixes his problem.
In the test text, just add a little space around the
cabs argument, rather than add another line for fixing.
You won't need to update the sample output that way.  :-)

>         * 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 16:33:39 -0000
> @@ -791,13 +791,14 @@
> 
>      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"
> +                "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. */";
>  };


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