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 677deca72446ae4f134e7fcd886c8569ec0c4096..c2eae499d3fab4830654a5ce4635e34039ac7961 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 1b3d4b462333199a8120a3b72af2e8a28c5888ef..889631763a535cdcc5de8ebed49b691b33d8ea1b 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;
                }
            }