This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: new parser: error recovery needs work
- From: Joe Buck <jbuck at synopsys dot com>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: gcc at gcc dot gnu dot org, mark at codesourcery dot com
- Date: Thu, 16 Jan 2003 07:55:28 -0800
- Subject: Re: new parser: error recovery needs work
- References: <20030116113344.C1BC1F2DD4@nile.gnat.com>
On Thu, Jan 16, 2003 at 06:33:44AM -0500, Robert Dewar wrote:
> > To be honest, I'm somewhat unsympathetic. Not because I think the error
> > messages are good, or because I think that we shouldn't do better, but
> > because it's hard to do better in some of these cases and because
> > we do noticably better in other cases -- the old parser just said
> > "parse error" a lot. :-)
>
> I certainly understand Mark's reaction here. I agree that it is unreasonable
> to label as a regression particular cases in which the error message may or
> may not be worse than the previous one (these things are somewhat subjective
> after all).
But this is the very case that Gerald wanted to hold the 3.0 release over.
The reaon is that the 2.9x -> 3.x transition moved all the C++ standard
library into the std:: namespace, as the standard required, but there
was tons of C++ code out there that compiled only on g++ 2.95. The error
messages were completely useless unless we added a small patch to put out
a coherent error message.
Now, we don't need to do anything elaborate; a couple of patches to
recognize the most common cases will do.