PR c++/47277
* parser.c (cp_parser_unqualified_id): Don't check
constructor_name_p for enums.
From-SVN: r174355
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.
&& (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.
--- /dev/null
+// PR c++/47277
+// { dg-options -std=c++0x }
+
+int main(void) {
+ enum e {};
+ e ev;
+ ev.e::~e_u(); // { dg-error "" }
+}