summaryrefslogtreecommitdiff
path: root/gcc/cp/cvt.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-08 12:32:37 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-08 12:32:37 +0000
commit313d62a349ecb8ad8a419783fe776c7ecd5384d0 (patch)
tree7717c5e62d64af14c96a1abe2b5c0bd6b8300db2 /gcc/cp/cvt.c
parenta540eb41c1e6735a9a0b9c549e6be624a25c9e6a (diff)
downloadgcc-313d62a349ecb8ad8a419783fe776c7ecd5384d0.tar.gz
2012-10-08 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 192205 using svnmerge.py git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@192206 138bc75d-0d04-0410-961f-82ee72b054a4
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;