2005-11-02 Mark Mitchell <mark@codesourcery.com>
+ PR c++/22434
+ * call.c (build_conditional_expr): Do bad conversions, if there's
+ no other choice.
+
PR c++/24560
* parser.c (cp_parser_postfix_dot_deref_expression): Improve error
message for use of overloaded functions on LHS of "." operator.
error ("operands to ?: have different types");
result = error_mark_node;
}
- else if (conv2 && !conv2->bad_p)
+ else if (conv2 && (!conv2->bad_p || !conv3))
{
arg2 = convert_like (conv2, arg2);
arg2 = convert_from_reference (arg2);
arg2_type = TREE_TYPE (arg2);
}
- else if (conv3 && !conv3->bad_p)
+ else if (conv3 && (!conv3->bad_p || !conv2))
{
arg3 = convert_like (conv3, arg3);
arg3 = convert_from_reference (arg3);