1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
+ * call.c (joust): Also warn about confusing conversion op/constructor
+ overload resolution.
+
* spew.c (yylex): Also return the TYPE_DECL if got_object.
Don't clear got_object after '~'.
* call.c (build_scoped_method_call): Tweak destructor handling.
}
/* warn about confusing overload resolution */
- if (winner && cand1->second_conv
- && ! DECL_CONSTRUCTOR_P (cand1->fn)
- && ! DECL_CONSTRUCTOR_P (cand2->fn))
+ if (winner && cand1->second_conv)
{
int comp = compare_ics (cand1->second_conv, cand2->second_conv);
- if (comp && comp != winner)
+ if (comp != winner)
{
struct z_candidate *w, *l;
if (winner == 1)
cp_warning (" for conversion from `%T' to `%T'",
TREE_TYPE (source_type (TREE_VEC_ELT (w->convs, 0))),
TREE_TYPE (w->second_conv));
- cp_warning (" because conversion sequence for `this' argument is better");
+ cp_warning (" because conversion sequence for the argument is better");
}
else
add_warning (w, l);