gcc/cp/
PR c++/46852
* parser.c (cp_parser_class_specifier): Check for TYPE_P.
gcc/testsuite/
PR c++/46852
* g++.dg/pr46852.C: New test.
From-SVN: r167894
+2010-12-15 Nathan Froyd <froydnj@codesourcery.com>
+
+ PR c++/46852
+ * parser.c (cp_parser_class_specifier): Check for TYPE_P.
+
2010-12-15 Jakub Jelinek <jakub@redhat.com>
PR debug/46815
break;
}
- if (want_semicolon)
+ /* If we don't have a type, then something is very wrong and we
+ shouldn't try to do anything clever. */
+ if (TYPE_P (type) && want_semicolon)
{
cp_token_position prev
= cp_lexer_previous_token_position (parser->lexer);
+2010-12-15 Nathan Froyd <froydnj@codesourcery.com>
+
+ PR c++/46852
+ * g++.dg/pr46852.C: New test.
+
2010-12-16 Jan Hubicka <jh@suse.cz>
PR middle-end/46939
--- /dev/null
+// PR c++/46852
+// { dg-do compile }
+
+template
+<
+class
+{ // { dg-error "" }