summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-12 07:55:16 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-12 07:55:16 +0000
commit7862bd81ab4d1a46521e6b2db8016bec72e9a96b (patch)
treec963fa94642006867fadc517340990f03ab3df38
parent39388a26fa5a89552366a150f6c28c2e80c1c63b (diff)
downloadppe42-gcc-7862bd81ab4d1a46521e6b2db8016bec72e9a96b.tar.gz
ppe42-gcc-7862bd81ab4d1a46521e6b2db8016bec72e9a96b.zip
* class.c (add_method): Correct handling of conversion operators.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55419 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/class.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 38de1a298e5..e2e1836a235 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 5222665f7bd..b59c7ce22ea 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -999,7 +999,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. */
OpenPOWER on IntegriCloud