re PR c++/2019 (Wrong line number warning listing the previous declaration of a befri...
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Wed, 5 Nov 2003 13:56:01 +0000 (13:56 +0000)
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>
Wed, 5 Nov 2003 13:56:01 +0000 (13:56 +0000)
PR c++/2019
* friend.c (add_friend): Don't display previous declaration in
case of duplicate friend warning.

From-SVN: r73268

gcc/cp/ChangeLog
gcc/cp/friend.c

index 677deca..c2eae49 100644 (file)
@@ -1,3 +1,9 @@
+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
index 1b3d4b4..8896317 100644 (file)
@@ -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;
                }
            }