Hi,

On 07/14/2015 09:10 PM, Jason Merrill wrote:
On 07/12/2015 01:53 PM, Paolo Carlini wrote:
On 07/11/2015 09:46 PM, Paolo Carlini wrote:
I'm going to ping this one too: a tad less trivial than the other one
- a little explanation here or in a comment would definitely help -
but certainly it looks much simpler than my own tries a while ago...
Regression testing information is also missing.
.... in fact, one could argue that most of difference between Andrea's
patch and my original try here:

     https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00821.html

is mostly a matter of style + TYPE_P vs the narrower identifier_p...

I'd prefer to fix this in the part of cp_parser_unqualified_id you quote; here ~x isn't really an unqualified-id, so we shouldn't treat it as one, at least when we're parsing tentatively.
I see. At the time I had this second try:

    https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01232.html

which has the action in cp_parser_unqualified_id but unfortunately is more complex. Certainly we can't just return inconditionally error_mark_node in that case, we have at least these regressions, a few accepts-invalid:

FAIL: g++.dg/parse/dtor14.C  -std=c++98  (test for errors, line 7)
FAIL: g++.dg/parse/dtor14.C  -std=c++11  (test for errors, line 7)
FAIL: g++.dg/parse/dtor14.C  -std=c++14  (test for errors, line 7)
FAIL: g++.dg/parse/dtor15.C  -std=c++98  (test for errors, line 8)
FAIL: g++.dg/parse/dtor15.C  -std=c++98 (test for excess errors)
FAIL: g++.dg/parse/dtor15.C  -std=c++11  (test for errors, line 8)
FAIL: g++.dg/parse/dtor15.C  -std=c++11 (test for excess errors)
FAIL: g++.dg/parse/dtor15.C  -std=c++14  (test for errors, line 8)
FAIL: g++.dg/parse/dtor15.C  -std=c++14 (test for excess errors)
FAIL: g++.dg/template/dtor5.C  -std=c++98  (test for errors, line 14)
FAIL: g++.dg/template/dtor5.C  -std=c++11  (test for errors, line 14)
FAIL: g++.dg/template/dtor5.C  -std=c++14  (test for errors, line 14)
FAIL: g++.dg/template/dtor7.C  -std=c++98  (test for errors, line 15)
XPASS: g++.dg/template/dtor7.C -std=c++98 (test for bogus messages, line 21)
FAIL: g++.dg/template/dtor7.C  -std=c++11  (test for errors, line 15)
XPASS: g++.dg/template/dtor7.C -std=c++11 (test for bogus messages, line 21)
FAIL: g++.dg/template/dtor7.C  -std=c++14  (test for errors, line 15)
XPASS: g++.dg/template/dtor7.C -std=c++14 (test for bogus messages, line 21)

Do you think something simpler could work?

Thanks!
Paolo.

Reply via email to