+2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ PR c++/59295
+ * friend.c (add_friend, make_friend_class): Move repeated friend
+ warning under Wredundant_decls.
+
2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
if (decl == TREE_VALUE (friends))
{
if (complain)
- warning (0, "%qD is already a friend of class %qT",
+ warning (OPT_Wredundant_decls,
+ "%qD is already a friend of class %qT",
decl, type);
return;
}
if (friend_type == probe)
{
if (complain)
- warning (0, "%qD is already a friend of %qT", probe, type);
+ warning (OPT_Wredundant_decls,
+ "%qD is already a friend of %qT", probe, type);
break;
}
}
if (same_type_p (probe, friend_type))
{
if (complain)
- warning (0, "%qT is already a friend of %qT", probe, type);
+ warning (OPT_Wredundant_decls,
+ "%qT is already a friend of %qT", probe, type);
break;
}
}