summaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
authorpzhao <pzhao@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-17 03:22:22 +0000
committerpzhao <pzhao@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-17 03:22:22 +0000
commitf08923b304ae4677059147e8cd52278a201f9ce0 (patch)
tree27ca1fe8f71a3b516fc9e49ec49456f83326e58c /gcc/cp/init.c
parent5735bd374bbb0a8c7ccb2347bfd08dfda3db9a6f (diff)
downloadgcc-f08923b304ae4677059147e8cd52278a201f9ce0.tar.gz
2009-12-17 Shujing Zhao <pearly.zhao@oracle.com>
PR c/40885 * c-common.h (ref_operator): New type. (build_indirect_ref): Adjust prototype with new argument. * c-typeck.c (build_indirect_ref): Accept ref_operator as argument and emit the diagnostics for easy translation. (build_array_ref): Update calls to build_indirect_ref. * c-omp.c (c_finish_omp_atomic): Likewise. * c-parser.c (c_parser_unary_expression, c_parser_postfix_expression_after_primary): Likewise. cp/ 2009-12-17 Shujing Zhao <pearly.zhao@oracle.com> * typeck.c (build_indirect_ref): Update the argument. (build_x_indirect_ref): Likewise. (cp_build_indirect_ref): Update the argument and emit the diagnostics for easy translation. (build_class_member_access_expr, build_array_ref, get_member_function_from_ptrfunc): Update calls. * cp-tree.h (build_x_indirect_ref, cp_build_indirect_ref): Update prototypes. * call.c (build_new_op, convert_like_real, build_x_va_arg, build_over_call): Update calls. * class.c (build_base_path, build_simple_base_path, build_vfn_ref): Likewise. * decl.c (start_preparsed_function): Likewise. * except.c (expand_start_catch_block, build_throw): Likewise. * init.c (emit_mem_initializers, expand_virtual_init, expand_virtual_init, build_new_1, build_vec_init, build_delete, build_vec_delete): Likewise. * parser.c (cp_parser_unary_expression): Likewise. * pt.c (tsubst_copy_and_build): Likewise. * rtti.c (build_headof, get_tinfo_decl_dynamic, get_typeid): Likewise. * semantics.c (finish_non_static_data_member, thisify_lambda_field): Likewise. * tree.c (build_dummy_object, stabilize_expr): Likewise. * typeck2.c (build_x_arrow): Likewise. testsuite/ 2009-12-17 Shujing Zhao <pearly.zhao@oracle.com> * g++.old-deja/g++.mike/net31.C: Make expected dg-error strings explicit. * g++.old-deja/g++.bugs/900213_02.C: Likewise. * g++.old-deja/g++.bugs/900215_02.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155302 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index e6397446b02..1bd80ffa0f8 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -834,7 +834,7 @@ emit_mem_initializers (tree mem_inits)
base_addr = build_base_path (PLUS_EXPR, current_class_ptr,
subobject, 1);
expand_aggr_init_1 (subobject, NULL_TREE,
- cp_build_indirect_ref (base_addr, NULL,
+ cp_build_indirect_ref (base_addr, RO_NULL,
tf_warning_or_error),
arguments,
LOOKUP_NORMAL,
@@ -918,7 +918,7 @@ expand_virtual_init (tree binfo, tree decl)
TREE_TYPE (vtt_parm),
vtt_parm,
vtt_index);
- vtbl2 = cp_build_indirect_ref (vtbl2, NULL, tf_warning_or_error);
+ vtbl2 = cp_build_indirect_ref (vtbl2, RO_NULL, tf_warning_or_error);
vtbl2 = convert (TREE_TYPE (vtbl), vtbl2);
/* The actual initializer is the VTT value only in the subobject
@@ -933,7 +933,7 @@ expand_virtual_init (tree binfo, tree decl)
}
/* Compute the location of the vtpr. */
- vtbl_ptr = build_vfield_ref (cp_build_indirect_ref (decl, NULL,
+ vtbl_ptr = build_vfield_ref (cp_build_indirect_ref (decl, RO_NULL,
tf_warning_or_error),
TREE_TYPE (binfo));
gcc_assert (vtbl_ptr != error_mark_node);
@@ -2055,7 +2055,7 @@ build_new_1 (VEC(tree,gc) **placement, tree type, tree nelts,
alloc_node, cookie_ptr);
size_ptr_type = build_pointer_type (sizetype);
cookie_ptr = fold_convert (size_ptr_type, cookie_ptr);
- cookie = cp_build_indirect_ref (cookie_ptr, NULL, complain);
+ cookie = cp_build_indirect_ref (cookie_ptr, RO_NULL, complain);
cookie_expr = build2 (MODIFY_EXPR, sizetype, cookie, nelts);
@@ -2067,7 +2067,7 @@ build_new_1 (VEC(tree,gc) **placement, tree type, tree nelts,
NEGATE_EXPR, sizetype,
size_in_bytes (sizetype)));
- cookie = cp_build_indirect_ref (cookie_ptr, NULL, complain);
+ cookie = cp_build_indirect_ref (cookie_ptr, RO_NULL, complain);
cookie = build2 (MODIFY_EXPR, sizetype, cookie,
size_in_bytes (elt_type));
cookie_expr = build2 (COMPOUND_EXPR, TREE_TYPE (cookie_expr),
@@ -2154,7 +2154,7 @@ build_new_1 (VEC(tree,gc) **placement, tree type, tree nelts,
}
else
{
- init_expr = cp_build_indirect_ref (data_addr, NULL, complain);
+ init_expr = cp_build_indirect_ref (data_addr, RO_NULL, complain);
if (TYPE_NEEDS_CONSTRUCTING (type) && !explicit_value_init_p)
{
@@ -2949,7 +2949,7 @@ build_vec_init (tree base, tree maxindex, tree init,
{
atype = build_pointer_type (atype);
stmt_expr = build1 (NOP_EXPR, atype, stmt_expr);
- stmt_expr = cp_build_indirect_ref (stmt_expr, NULL, complain);
+ stmt_expr = cp_build_indirect_ref (stmt_expr, RO_NULL, complain);
TREE_NO_WARNING (stmt_expr) = 1;
}
@@ -3144,7 +3144,7 @@ build_delete (tree type, tree addr, special_function_kind auto_delete,
/*alloc_fn=*/NULL_TREE);
}
- expr = build_dtor_call (cp_build_indirect_ref (addr, NULL,
+ expr = build_dtor_call (cp_build_indirect_ref (addr, RO_NULL,
tf_warning_or_error),
auto_delete, flags);
if (do_delete)
@@ -3298,7 +3298,7 @@ build_vec_delete (tree base, tree maxindex,
size_ptr_type,
fold_convert (size_ptr_type, base),
cookie_addr);
- maxindex = cp_build_indirect_ref (cookie_addr, NULL, tf_warning_or_error);
+ maxindex = cp_build_indirect_ref (cookie_addr, RO_NULL, tf_warning_or_error);
}
else if (TREE_CODE (type) == ARRAY_TYPE)
{