summaryrefslogtreecommitdiffstats
path: root/gcc/cp/friend.c
diff options
context:
space:
mode:
authorlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-05 13:56:01 +0000
committerlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-05 13:56:01 +0000
commit8853c40e7ae9ff9dca80c91dcb939945757664b1 (patch)
treeb0625b272155983f3e8d23ac164bc554c7028466 /gcc/cp/friend.c
parent7554bbf53b07440ed71da965d26ca59944f4449c (diff)
downloadppe42-gcc-8853c40e7ae9ff9dca80c91dcb939945757664b1.tar.gz
ppe42-gcc-8853c40e7ae9ff9dca80c91dcb939945757664b1.zip
PR c++/2019
* friend.c (add_friend): Don't display previous declaration in case of duplicate friend warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73268 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/friend.c')
-rw-r--r--gcc/cp/friend.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index 1b3d4b46233..889631763a5 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -158,12 +158,8 @@ add_friend (tree type, tree decl, bool complain)
if (decl == TREE_VALUE (friends))
{
if (complain)
- {
- warning ("`%D' is already a friend of class `%T'",
- decl, type);
- cp_warning_at ("previous friend declaration of `%D'",
- TREE_VALUE (friends));
- }
+ warning ("`%D' is already a friend of class `%T'",
+ decl, type);
return;
}
}
OpenPOWER on IntegriCloud