]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/13558 (ICE (illegal code) at cp/friend.c:200)
authorSteven Bosscher <stevenb@suse.de>
Tue, 13 Jan 2004 00:44:51 +0000 (00:44 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Tue, 13 Jan 2004 00:44:51 +0000 (00:44 +0000)
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
gcc/cp/parser.c

index 7dd1d8862a7503b3ef01df02da4a53af60afb12d..859f9799a922621ae0ba47fcc2aa5b3e26542124 100644 (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
index fe3a3dec9651c0fa1cab08aff90de40768a3e0a6..3de7c1d86d357300b9e6e6737bba98fd912d71bb 100644 (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