From fdd09134be318d63400363c8626141dcdba9686a Mon Sep 17 00:00:00 2001 From: Steven Bosscher Date: Tue, 13 Jan 2004 00:44:51 +0000 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/parser.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7dd1d8862a7..859f9799a92 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2003-01-12 Steven Bosscher + + 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 PR c++/12815 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index fe3a3dec965..3de7c1d86d3 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -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 -- 2.30.2