From 04ec0065dc10346e670c8972cb63a7c4f3dd4993 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Fri, 12 Jul 2002 07:55:16 +0000 Subject: [PATCH] * class.c (add_method): Correct handling of conversion operators. From-SVN: r55419 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/class.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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 + + * class.c (add_method): Correct handling of conversion operators. + 2002-07-11 Mark Mitchell 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. */ -- 2.30.2