C parser breakage due to c99 block scopes

Zack Weinberg zackw@Stanford.EDU
Fri Nov 17 00:49:00 GMT 2000


On Fri, Nov 17, 2000 at 08:29:01AM +0000, Joseph S. Myers wrote:
> On Thu, 16 Nov 2000, Zack Weinberg wrote:
> 
> > These are the only uses of if_prefix, simple_if, etc. in the file, so
> > I believe the simplest fix is to change the if_prefix action so it
> > uses $<filename>-2 and $<lineno>-1 instead of -1 and 0.  However, I'd
> > like us to think about getting rid of this insanely fragile line-
> > number-remembering scheme as soon as feasible.
> 
> Also please add a testcase for this problem to the testsuite.

I was going to say "it trips during bootstrap," but then I remembered
that that's only because of a temporary macro which goes away with the
patch I just posted.  Right.  Will do.

> I suspect the parser could do with a lot of cleanup; for example, most of
> the 53 expected conflicts could probably be removed with a bit of careful
> rewriting (especially of how attributes get parsed).

Might be better to put the effort into the recursive-descent parser
Mark was talking about not so long ago.

zw


More information about the Gcc-bugs mailing list