re PR c++/13558 (ICE (illegal code) at cp/friend.c:200)

PR c++/13558
	* parser.c (cp_parser_member_declaration): Any non-type is also
	not a class or a function.

From-SVN: r75776
This commit is contained in:
Steven Bosscher 2004-01-13 00:44:51 +00:00 committed by Steven Bosscher
parent 3c702a6f25
commit fdd09134be
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2003-01-12 Steven Bosscher <stevenb@suse.de>
PR c++/13558
* parser.c (cp_parser_member_declaration): Any non-type is also
not a class or a function.
2004-01-12 Jason Merrill <jason@redhat.com>
PR c++/12815

View File

@ -12226,7 +12226,7 @@ cp_parser_member_declaration (cp_parser* parser)
}
}
}
if (!type)
if (!type || !TYPE_P (type))
error ("friend declaration does not name a class or "
"function");
else