summaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1998-06-05 23:03:33 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1998-06-05 23:03:33 +0000
commit37aa4d8cad4dfe493f0510cc4313ce552017b1db (patch)
tree7c4ecda3d785bc68b7403aea9e747626a2e81718 /gcc/cp/call.c
parent46b923c55e28b28942a136809299f2063347e2bf (diff)
downloadgcc-37aa4d8cad4dfe493f0510cc4313ce552017b1db.tar.gz
* call.c (joust): Also warn about confusing conversion op/constructor
overload resolution. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20258 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 7007cdf44ed..cf0a21a754b 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -4298,12 +4298,10 @@ joust (cand1, cand2, warn)
}
/* 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)
@@ -4316,7 +4314,7 @@ joust (cand1, cand2, warn)
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);