aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1999-03-29 01:09:28 +0000
committerJason Merrill <jason@gcc.gnu.org>1999-03-28 20:09:28 -0500
commitedef8288ec6bbbe0cbbccd935a0ec1f5c0864255 (patch)
tree8fefff4588d383cbf541e88ded980e01a8cdd52b
parent4c692e1975a88bbbb33f388fc1800bbaede34aa0 (diff)
downloadgcc-edef8288ec6bbbe0cbbccd935a0ec1f5c0864255.zip
gcc-edef8288ec6bbbe0cbbccd935a0ec1f5c0864255.tar.gz
gcc-edef8288ec6bbbe0cbbccd935a0ec1f5c0864255.tar.bz2
* pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
From-SVN: r26050
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/pt.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 96970ed..beee754 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
+
+ * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
+
1999-03-27 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (add_friend): Declare.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 8855efa..04ca1b3 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -7317,10 +7317,11 @@ fn_type_unification (fn, explicit_targs, targs, args, return_type,
if (DECL_CONV_FN_P (fn))
{
/* This is a template conversion operator. Use the return types
- as well as the argument types. */
+ as well as the argument types. We use it instead of 'this', since
+ we could be comparing conversions from different classes. */
parms = scratch_tree_cons (NULL_TREE, TREE_TYPE (fntype),
- parms);
- args = scratch_tree_cons (NULL_TREE, return_type, args);
+ TREE_CHAIN (parms));
+ args = scratch_tree_cons (NULL_TREE, return_type, TREE_CHAIN (args));
}
/* We allow incomplete unification without an error message here