diff options
author | Steven Bosscher <stevenb@suse.de> | 2004-01-13 00:44:51 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2004-01-13 00:44:51 +0000 |
commit | fdd09134be318d63400363c8626141dcdba9686a (patch) | |
tree | 369ea04fb2e5c5c9e577d0aa0daf8cfce11b65ac /gcc | |
parent | 3c702a6f251704ba3d167983cfc388f3b9f97b75 (diff) | |
download | gcc-fdd09134be318d63400363c8626141dcdba9686a.zip gcc-fdd09134be318d63400363c8626141dcdba9686a.tar.gz gcc-fdd09134be318d63400363c8626141dcdba9686a.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/parser.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7dd1d88..859f979 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index fe3a3de..3de7c1d 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 |