2011-04-07 Jason Merrill <jason@redhat.com>
+ PR c++/48481
+ * tree.c (build_overload): Allow an unwrapped FUNCTION_DECL
+ at the end of the chain.
+ * pt.c (dependent_template_p): Use OVL_CURRENT/NEXT.
+ (iterative_hash_template_arg): Likewise.
+
PR c++/48481
* cp-tree.h (OVL_ARG_DEPENDENT): New.
* name-lookup.c (add_function): Set it.
}
else if (TREE_CODE (n) == OVERLOAD)
{
- for (; n; n = OVL_CHAIN (n))
- if (arg_assoc_type (k, TREE_TYPE (OVL_FUNCTION (n))))
+ for (; n; n = OVL_NEXT (n))
+ if (arg_assoc_type (k, TREE_TYPE (OVL_CURRENT (n))))
return true;
}
return val;
case OVERLOAD:
- for (; arg; arg = OVL_CHAIN (arg))
- val = iterative_hash_template_arg (OVL_FUNCTION (arg), val);
+ for (; arg; arg = OVL_NEXT (arg))
+ val = iterative_hash_template_arg (OVL_CURRENT (arg), val);
return val;
case CONSTRUCTOR:
{
while (tmpl)
{
- if (dependent_template_p (OVL_FUNCTION (tmpl)))
+ if (dependent_template_p (OVL_CURRENT (tmpl)))
return true;
- tmpl = OVL_CHAIN (tmpl);
+ tmpl = OVL_NEXT (tmpl);
}
return false;
}
{
if (! chain && TREE_CODE (decl) != TEMPLATE_DECL)
return decl;
- if (chain && TREE_CODE (chain) != OVERLOAD)
- chain = ovl_cons (chain, NULL_TREE);
return ovl_cons (decl, chain);
}