Commit b2d49fe5 by Nathan Froyd Committed by Nathan Froyd

re PR c++/46852 (ICE: tree check: expected class ‘type’, have ‘exceptional’…

re PR c++/46852 (ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in cp_parser_class_specifier, at cp/parser.c:16947)

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
parent 5210bbc5
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
......
......@@ -16937,7 +16937,9 @@ cp_parser_class_specifier (cp_parser* parser)
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
......
// PR c++/46852
// { dg-do compile }
template
<
class
{ // { 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