[PATCH] Fix crash27.C and crash29.C testcases
Gabriel Dos Reis
gdr@codesourcery.com
Tue Nov 7 02:34:00 GMT 2000
Bernd Schmidt <bernds@redhat.co.uk> writes:
| On Mon, 6 Nov 2000, Theodore Papadopoulo wrote:
|
| >
| > mark@codesourcery.com said:
| > > This is why we are writing a new parser. Of course, that won't help
| > > before 3.0. I'm somewhat tempted just to ignore these kinds of bugs
| > > for 3.0, rather than complicate the code with a lot of gunk that we'll
| > > then want to remove later -- but that's perhaps irresponsible. It
| > > would be great if Jason Merill would comment.
| >
| > Just my 0.00000002c (the simple user view):
| >
| > 1) Ignoring these kinds of bugs will give the impression that g++-3.0 is
| > not a good compiler because it crashes very often (even if it happens
| > most often after a syntax error). I'm not sure this is good in terms
| > of "public image". All the more that so much good work has been done,
| > it would be a pity to destroy the its "image" in this way...
|
| Didn't we have a hack once that turned all ICEs into a friendlier message
| ("confused by earlier errors, bailing out") if an error in the input was
| encountered before?
My personal opinion here. We're ICEing more than we should.
As Theo, I think we should make the parser more robust. We should not
be ICEing on syntax error -- that renders the compiler unusable in
education for example if not in production. Even if we're writing a
new parser.
As a related issue, I think we should not issue a syntax error message
on construct like
export template<typename> class X;
Perhaps a sorry for non-implemented feature?
My two cents.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-patches
mailing list