summaryrefslogtreecommitdiff
path: root/gcc/cp/cvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r--gcc/cp/cvt.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index 7e880b44b99..89f59149ab5 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -1560,10 +1560,13 @@ build_type_conversion (code, xtype, expr, for_sure)
{
if (winner)
{
- cp_error ("ambiguous conversion from `%T' to `%T'", basetype,
- xtype);
- cp_error (" candidate conversions include `%T' and `%T'",
- TREE_VALUE (winner), TREE_VALUE (conv));
+ if (for_sure)
+ {
+ cp_error ("ambiguous conversion from `%T' to `%T'", basetype,
+ xtype);
+ cp_error (" candidate conversions include `%T' and `%T'",
+ TREE_VALUE (winner), TREE_VALUE (conv));
+ }
return NULL_TREE;
}
else