diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-11-29 15:30:30 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-11-29 10:30:30 -0500 |
commit | 9f3d9e461cb4c63c2b260ae6509799db75346db8 (patch) | |
tree | f45c6a999dcbc8d7be9cea0b076534d0a4f97ba3 | |
parent | cae94af8461cdc204d4def9fb140bdd1b0a0047d (diff) | |
download | gcc-9f3d9e461cb4c63c2b260ae6509799db75346db8.zip gcc-9f3d9e461cb4c63c2b260ae6509799db75346db8.tar.gz gcc-9f3d9e461cb4c63c2b260ae6509799db75346db8.tar.bz2 |
pt.c (unify, [...]): Pass down 'strict' rather than UNIFY_ALLOW_NONE.
* pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
UNIFY_ALLOW_NONE.
(convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
(resolve_overloaded_unification): Strip baselinks.
Fixes Sec14/10_2/P14264.C, Sec14/10_2/P14278.C, Sec14/10_2/C14413.cm.
From-SVN: r23980
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/pt.c | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ec88e46..2ec4103 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +1998-11-29 Jason Merrill <jason@yorick.cygnus.com> + + * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than + UNIFY_ALLOW_NONE. + (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE. + (resolve_overloaded_unification): Strip baselinks. + Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * g++spec.c: Don't prototype xmalloc. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index c8ecd45..948c53e 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -2737,7 +2737,7 @@ convert_nontype_argument (type, expr) fns = TREE_OPERAND (expr, 0); - fn = instantiate_type (TREE_TYPE (TREE_TYPE (type)), + fn = instantiate_type (TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (type)), fns, 0); if (fn == error_mark_node) @@ -7151,6 +7151,11 @@ resolve_overloaded_unification (tparms, targs, parm, arg, strict, if (TREE_CODE (arg) == ADDR_EXPR) arg = TREE_OPERAND (arg, 0); + + /* Strip baselink information. */ + while (TREE_CODE (arg) == TREE_LIST) + arg = TREE_VALUE (arg); + if (TREE_CODE (arg) == TEMPLATE_ID_EXPR) { /* If we got some explicit template args, we need to plug them into @@ -7711,7 +7716,7 @@ unify (tparms, targs, parm, arg, strict, explicit_mask) TYPE_OFFSET_BASETYPE (arg), UNIFY_ALLOW_NONE, explicit_mask)) return 1; return unify (tparms, targs, TREE_TYPE (parm), TREE_TYPE (arg), - UNIFY_ALLOW_NONE, explicit_mask); + strict, explicit_mask); case CONST_DECL: if (arg != decl_constant_value (parm)) |