diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-27 20:05:34 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-27 20:05:34 +0000 |
commit | d6fbd579a13ed232f0d25237c7d661fe00780f83 (patch) | |
tree | 108a323659c8b36f70d1648d888403d8d41841bf /gcc/cp/rtti.c | |
parent | 0b0b7fcc1da833360e6ccd1f46664c626c57b827 (diff) | |
download | gcc-d6fbd579a13ed232f0d25237c7d661fe00780f83.tar.gz |
Require lvalues as specified by the standard.
* typeck.c (lvalue_or_else): Use real_lvalue_p.
(cp_build_addr_expr_1): Split out of cp_build_unary_op.
(cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
(decay_conversion, get_member_function_from_ptrfunc): Adjust.
(build_x_unary_op, build_reinterpret_cast_1): Adjust.
(build_const_cast_1): Adjust.
* cp-tree.h: Declare new fns.
* call.c (build_this, convert_like_real, build_over_call): Adjust.
(initialize_reference): Adjust.
* class.c (build_base_path, convert_to_base_statically): Adjust.
(build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
* cvt.c (build_up_reference, convert_to_reference): Adjust.
* decl.c (register_dtor_fn): Adjust.
* decl2.c (build_offset_ref_call_from_tree): Adjust.
* except.c (initialize_handler_parm): Adjust.
* init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
* rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
* tree.c (stabilize_expr): Adjust.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164666 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r-- | gcc/cp/rtti.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index c994683aae8..d7a151dec1f 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -693,10 +693,10 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain) static_type = TYPE_MAIN_VARIANT (TREE_TYPE (exprtype)); td2 = get_tinfo_decl (target_type); mark_used (td2); - td2 = cp_build_unary_op (ADDR_EXPR, td2, 0, complain); + td2 = cp_build_addr_expr (td2, complain); td3 = get_tinfo_decl (static_type); mark_used (td3); - td3 = cp_build_unary_op (ADDR_EXPR, td3, 0, complain); + td3 = cp_build_addr_expr (td3, complain); /* Determine how T and V are related. */ boff = dcast_base_hint (static_type, target_type); @@ -706,7 +706,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain) expr1 = expr; if (tc == REFERENCE_TYPE) - expr1 = cp_build_unary_op (ADDR_EXPR, expr1, 0, complain); + expr1 = cp_build_addr_expr (expr1, complain); elems[0] = expr1; elems[1] = td3; @@ -913,8 +913,7 @@ tinfo_base_init (tinfo_s *ti, tree target) } vtable_ptr = get_vtable_decl (real_type, /*complete=*/1); - vtable_ptr = cp_build_unary_op (ADDR_EXPR, vtable_ptr, 0, - tf_warning_or_error); + vtable_ptr = cp_build_addr_expr (vtable_ptr, tf_warning_or_error); /* We need to point into the middle of the vtable. */ vtable_ptr = build2 |