mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-09 21:37:37 +08:00
Suppress warning about duplicate decls if the first decl is a friend.
From-SVN: r42073
This commit is contained in:
parent
0c2dc519c9
commit
3581fae0bb
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user