2014-02-25 Jason Merrill <jason@redhat.com>
+ * call.c (print_conversion_rejection): Handle n_arg of -2.
+ (build_user_type_conversion_1): Pass it.
+
PR c++/55877
* decl2.c (no_linkage_error): Handle C++98 semantics.
(reset_type_linkage): Move from decl.c.
inform (loc, " no known conversion for implicit "
"%<this%> parameter from %qT to %qT",
info->from_type, info->to_type);
+ else if (info->n_arg == -2)
+ /* Conversion of conversion function return value failed. */
+ inform (loc, " no known conversion from %qT to %qT",
+ info->from_type, info->to_type);
else
inform (loc, " no known conversion for argument %d from %qT to %qT",
info->n_arg+1, info->from_type, info->to_type);
if (!ics)
{
cand->viable = 0;
- cand->reason = arg_conversion_rejection (NULL_TREE, -1,
+ cand->reason = arg_conversion_rejection (NULL_TREE, -2,
rettype, totype);
}
else if (DECL_NONCONVERTING_P (cand->fn)
{
cand->viable = -1;
cand->reason
- = bad_arg_conversion_rejection (NULL_TREE, -1,
+ = bad_arg_conversion_rejection (NULL_TREE, -2,
rettype, totype);
}
else if (primary_template_instantiation_p (cand->fn)