From: Jason Merrill Date: Sun, 29 Nov 1998 15:30:30 +0000 (+0000) Subject: pt.c (unify, [...]): Pass down 'strict' rather than UNIFY_ALLOW_NONE. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f3d9e461cb4c63c2b260ae6509799db75346db8;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ec88e46c4ab..2ec4103d885 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +1998-11-29 Jason Merrill + + * 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 * g++spec.c: Don't prototype xmalloc. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index c8ecd4599b3..948c53e0c4f 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))