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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index 86f01abf2f3..d30c7e5309e 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -339,12 +339,12 @@ build_up_reference (tree type, tree arg, int flags, tree decl,
LOOKUP_ONLYCONVERTING|DIRECT_BIND);
}
else if (!(flags & DIRECT_BIND) && ! lvalue_p (arg))
- return get_target_expr (arg);
+ return get_target_expr_sfinae (arg, complain);
/* If we had a way to wrap this up, and say, if we ever needed its
address, transform all occurrences of the register, into a memory
reference we could win better. */
- rval = cp_build_addr_expr (arg, tf_warning_or_error);
+ rval = cp_build_addr_expr (arg, complain);
if (rval == error_mark_node)
return error_mark_node;
@@ -842,7 +842,7 @@ ocp_convert (tree type, tree expr, int convtype, int flags,
ctor = e;
- if (abstract_virtuals_error (NULL_TREE, type))
+ if (abstract_virtuals_error_sfinae (NULL_TREE, type, complain))
return error_mark_node;
if (BRACE_ENCLOSED_INITIALIZER_P (ctor))
@@ -1514,8 +1514,6 @@ build_expr_type_conversion (int desires, tree expr, bool complain)
"converting NULL to non-pointer type");
}
- basetype = TREE_TYPE (expr);
-
if (basetype == error_mark_node)
return error_mark_node;