This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fixincludes patch] Make broken_cabs match more generously
- From: Bruce Korb <bkorb at veritas dot com>
- To: Nathanael Nerode <neroden at twcny dot rr dot com>
- Cc: gcc-patches at gcc dot gnu dot org, pinskia at physics dot uc dot edu
- Date: Fri, 01 Aug 2003 09:42:17 -0700
- Subject: Re: [fixincludes patch] Make broken_cabs match more generously
- References: <20030801163553.GA3938@twcny.rr.com>
- Reply-to: bkorb at veritas dot com
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. */";
> };