]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* class.c (add_method): Correct handling of conversion operators.
authorMark Mitchell <mark@codesourcery.com>
Fri, 12 Jul 2002 07:56:49 +0000 (07:56 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 12 Jul 2002 07:56:49 +0000 (07:56 +0000)
From-SVN: r55420

gcc/cp/ChangeLog
gcc/cp/class.c

index 2e404daf06d0001e8460da8f74418f7fec85f8d6..9cf5b66e864e5302d8dc068ad619405f6b6009ef 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-12  Mark Mitchell  <mark@codesourcery.com>
+
+       * class.c (add_method): Correct handling of conversion operators.
+
 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/7224
index 7dd19503382aa19dd17807ca778c3df2df4ea689..998eec04a7c5d72821e5c6a62f2d482ca56da1cf 100644 (file)
@@ -1006,7 +1006,10 @@ add_method (type, method, error_p)
          if (! DECL_STATIC_FUNCTION_P (method))
            parms2 = TREE_CHAIN (parms2);
 
-         if (same && compparms (parms1, parms2))
+         if (same && compparms (parms1, parms2) 
+             && (!DECL_CONV_FN_P (fn) 
+                 || same_type_p (TREE_TYPE (TREE_TYPE (fn)),
+                                 TREE_TYPE (TREE_TYPE (method)))))
            {
              if (using && DECL_CONTEXT (fn) == type)
                /* Defer to the local function.  */