From: Benjamin Kosnik Date: Tue, 21 Apr 1998 19:08:46 +0000 (+0000) Subject: decl.c (duplicate_decls): Only check DECL_FRIEND_P if function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70233af32f3b92405bfef17a9e845d9e194dc2df;p=gcc.git decl.c (duplicate_decls): Only check DECL_FRIEND_P if function. 8 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function. g++/15307 redux From-SVN: r19362 --- diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 164d7068613..890c9f5fd7c 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -2794,7 +2794,7 @@ duplicate_decls (newdecl, olddecl) /* Don't warn about extern decl followed by (tentative) definition. */ && !(DECL_EXTERNAL (olddecl) && ! DECL_EXTERNAL (newdecl)) /* Don't warn about friends, let add_friend take care of it. */ - && ! DECL_FRIEND_P (newdecl)) + && (TREE_CODE (newdecl) == FUNCTION_DECL && ! DECL_FRIEND_P (newdecl))) { cp_warning ("redundant redeclaration of `%D' in same scope", newdecl); cp_warning_at ("previous declaration of `%D'", olddecl);