From: Kriang Lerdsuwanakij Date: Wed, 5 Nov 2003 13:56:01 +0000 (+0000) Subject: re PR c++/2019 (Wrong line number warning listing the previous declaration of a befri... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=437a91e66436c2093bcf0f816eff9ea23ab09cf4;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 677deca7244..c2eae499d3f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2003-11-05 Kriang Lerdsuwanakij + + PR c++/2019 + * friend.c (add_friend): Don't display previous declaration in + case of duplicate friend warning. + 2003-11-02 Kriang Lerdsuwanakij PR c++/9810 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; } }