Commit 437a91e6 by Kriang Lerdsuwanakij Committed by Kriang Lerdsuwanakij

re PR c++/2019 (Wrong line number warning listing the previous declaration of a…

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
parent 6bc1c519
2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/2019
* friend.c (add_friend): Don't display previous declaration in
case of duplicate friend warning.
2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9810
......
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment