Commit 54ae96de by Mark Mitchell Committed by Mark Mitchell

* call.c (joust): Fix handling of overloaded builtin operators.

From-SVN: r34269
parent 28ecb7ab
2000-05-30 Mark Mitchell <mark@codesourcery.com>
* call.c (joust): Fix handling of overloaded builtin operators.
2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
* cp-tree.h (DECL_ANTICIPATED): New macro.
......
......@@ -5128,7 +5128,7 @@ joust (cand1, cand2, warn)
/* Kludge around broken overloading rules whereby
Integer a, b; test ? a : b; is ambiguous, since there's a builtin
that takes references and another that takes values. */
if (DECL_OVERLOADED_OPERATOR_P (cand1->fn) == COND_EXPR)
if (cand1->fn == ansi_opname (COND_EXPR))
{
tree c1 = TREE_VEC_ELT (cand1->convs, 1);
tree c2 = TREE_VEC_ELT (cand2->convs, 1);
......
// Build don't link:
// Origin: Nathan Sidwell <nathan@codesourcery.com>
struct A {
bool operator== (A const &);
operator bool () const;
operator int * () const;
};
bool foo (A &a1, A &a2)
{
return a1 == a2;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment