Suppress warning about duplicate decls if the first decl is a friend.

From-SVN: r42073
This commit is contained in:
Nick Clifton 2001-05-14 17:09:34 +00:00 committed by Nick Clifton
parent 0c2dc519c9
commit 3581fae0bb
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
* decl.c (duplicate_decls): Suppress warning about duplicate
decls if the first decl is a friend.
Mon May 14 17:34:48 CEST 2001 Jan Hubicka <jh@suse.cz>
* i386.h (TARGET_64BIT): Define to constant if !TARGET_BI_ARCH

View File

@ -3457,7 +3457,7 @@ duplicate_decls (newdecl, olddecl)
/* Don't warn about extern decl followed by definition. */
&& !(DECL_EXTERNAL (olddecl) && ! DECL_EXTERNAL (newdecl))
/* Don't warn about friends, let add_friend take care of it. */
&& ! DECL_FRIEND_P (newdecl))
&& ! (DECL_FRIEND_P (newdecl) || DECL_FRIEND_P (olddecl)))
{
cp_warning ("redundant redeclaration of `%D' in same scope", newdecl);
cp_warning_at ("previous declaration of `%D'", olddecl);