This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Is CPP broken? (Re: Strange gcc error message)
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.