Is CPP broken? (Re: Strange gcc error message)

Neil Booth neil@daikokuya.demon.co.uk
Mon Oct 8 11:37:00 GMT 2001


Zack Weinberg wrote:-

> I think this will happen for any condition where cpp_start_read
> returns an error: the constraint being enforced here is that whenever
> yyparse returns 1, errorcount is nonzero.

Hmmm.  Why is this the case?  I had a quick skim, and cpplib should
be setting its error count to non-zero.

So I'd guess that the front end breaks out in some kind of fast path,
and doesn't do the cpp_errors() call to get the number of errors that
it otherwise does.  In which case I'd rather fix it there.

Have I got this wrong?  Or maybe the current code is structured
awkwardly so this isn't natural.

Neil.



More information about the Gcc-bugs mailing list