Commit 1fbbe7d6 by Jason Merrill Committed by Jason Merrill

re PR c++/47277 ([C++0x] pseudo destructor code that cause an internal compiler…

re PR c++/47277 ([C++0x] pseudo destructor code that cause an internal compiler error with std=gnu++0x)

	PR c++/47277
	* parser.c (cp_parser_unqualified_id): Don't check
	constructor_name_p for enums.

From-SVN: r174355
parent 6d258f31
2011-05-27 Jason Merrill <jason@redhat.com>
PR c++/47277
* parser.c (cp_parser_unqualified_id): Don't check
constructor_name_p for enums.
PR c++/47687
* pt.c (dependent_type_p_r): Avoid infinite recursion.
......
......@@ -4069,7 +4069,8 @@ cp_parser_unqualified_id (cp_parser* parser,
&& (cp_lexer_peek_nth_token (parser->lexer, 2)->type
!= CPP_LESS)
&& (token->u.value == TYPE_IDENTIFIER (scope)
|| constructor_name_p (token->u.value, scope)))
|| (CLASS_TYPE_P (scope)
&& constructor_name_p (token->u.value, scope))))
{
cp_lexer_consume_token (parser->lexer);
return build_nt (BIT_NOT_EXPR, scope);
......
2011-05-27 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/enum18.C: New.
* g++.dg/cpp0x/lambda/lambda-nested4.C: New.
* g++.dg/cpp0x/error6.C: New.
......
// PR c++/47277
// { dg-options -std=c++0x }
int main(void) {
enum e {};
e ev;
ev.e::~e_u(); // { dg-error "" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment