This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Excess errors in testcases (was Re: [RFC] g++.dg/parse/undefined1.C fails)
- From: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: gcc at gcc dot gnu dot org
- Cc: mark at codesourcery dot com, pcarlini at unitus dot it
- Date: Sat, 25 Jan 2003 22:18:11 +0100
- Subject: Excess errors in testcases (was Re: [RFC] g++.dg/parse/undefined1.C fails)
Hi,
first of all, sorry for the confusion (it was me who added the testcase).
It passed a couple of days ago, but I didn't have CVS access then, so I commited
it later (when the additional error message was introduced). So that's
really a regression (but I agree with Mark that this is a low priority one).
In fact that's not the only testcase I have with the same behavior:
With the old parser the testcase ICE'd. With the new parser we don't
have an ICE, but a couple of excess messages in the lines with follow
the errorneous ones. (I don't blame the parser for that - the code *is*
illegal. I don't even think that we have to fix such a behavior.)
Since we don't want ICEs to creep back in there should be a testcase
neverthess IMHO. The question, however, is: How can we make one?
Providing a testcase and mark it as XFAIL doesn't make much sense,
since it doesn't prevent us from ICEs. This is as bad as having no
testcase at all.
I can think of three strategies:
a) Add "dg-error" also for the lines with excess errors.
And add a comment that this is an excess error (so that it's obvious
that this error is not really expected and can be safely changed when
a future parser does better).
b) Add something like "dg-excess-error" to the testsuite.
The parser may or may not issue an error here, in both cases the test
passes. This is the cleanest solution IMHO.
c) Ugly hack to simulate b): We just merge the lines with the error and the
excess error. The testcase becomes less readable, but no hacking of the
testsuite is required.
Since I've got some more testcases with such a behavior, I'd like to know
what should I do with them. Any suggestions?
Regards,
Volker