aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2001-11-26 08:11:15 -0500
committerJason Merrill <jason@gcc.gnu.org>2001-11-26 08:11:15 -0500
commit5b0c589655c47d528012f3feb6ca62005568aaae (patch)
tree5f19d8bc1040233c72b574828da44f25afee64be /gcc
parent5bc72aebcb66d8596e9084183c843b64b4fd599e (diff)
downloadgcc-5b0c589655c47d528012f3feb6ca62005568aaae.zip
gcc-5b0c589655c47d528012f3feb6ca62005568aaae.tar.gz
gcc-5b0c589655c47d528012f3feb6ca62005568aaae.tar.bz2
* call.c (joust): Remove COND_EXPR hack.
From-SVN: r47346
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/call.c22
2 files changed, 5 insertions, 21 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0284ccc..68ae9e1 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2001-11-26 Jason Merrill <jason@redhat.com>
+
+ * call.c (joust): Remove COND_EXPR hack.
+
2001-11-25 Aldy Hernandez <aldyh@redhat.com>
* cp/search.c (lookup_base_r): Declare bk in variable declaration
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index c0ab2c2..eea7f7e8 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -1933,7 +1933,7 @@ add_builtin_candidate (candidates, code, code2, fnname, type1, type2,
break;
case COND_EXPR:
- /* [over.builtin]
+ /* [over.built]
For every pair of promoted arithmetic types L and R, there
exist candidate operator functions of the form
@@ -5413,26 +5413,6 @@ joust (cand1, cand2, warn)
/* cand2 is built-in; prefer cand1. */
return 1;
}
-
- /* 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 (cand1->fn == cand2->fn
- && cand1->fn == ansi_opname (COND_EXPR))
- {
- tree c1 = TREE_VEC_ELT (cand1->convs, 1);
- tree c2 = TREE_VEC_ELT (cand2->convs, 1);
- tree t1 = strip_top_quals (non_reference (TREE_TYPE (c1)));
- tree t2 = strip_top_quals (non_reference (TREE_TYPE (c2)));
-
- if (same_type_p (t1, t2))
- {
- if (TREE_CODE (c1) == REF_BIND && TREE_CODE (c2) != REF_BIND)
- return 1;
- if (TREE_CODE (c1) != REF_BIND && TREE_CODE (c2) == REF_BIND)
- return -1;
- }
- }
}
/* If the two functions are the same (this can happen with declarations