aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/friend.c
diff options
context:
space:
mode:
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>2003-11-05 13:56:01 +0000
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>2003-11-05 13:56:01 +0000
commit437a91e66436c2093bcf0f816eff9ea23ab09cf4 (patch)
treeb0625b272155983f3e8d23ac164bc554c7028466 /gcc/cp/friend.c
parent6bc1c519a50c4d04f634e33f397f0aec39d3c132 (diff)
downloadgcc-437a91e66436c2093bcf0f816eff9ea23ab09cf4.zip
gcc-437a91e66436c2093bcf0f816eff9ea23ab09cf4.tar.gz
gcc-437a91e66436c2093bcf0f816eff9ea23ab09cf4.tar.bz2
re PR c++/2019 (Wrong line number warning listing the previous declaration of a befriended function)
PR c++/2019 * friend.c (add_friend): Don't display previous declaration in case of duplicate friend warning. From-SVN: r73268
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 1b3d4b4..8896317 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;
}
}