summaryrefslogtreecommitdiffstats
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 54d84f47ddd..ee5c279a3f6 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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);
OpenPOWER on IntegriCloud