From 680a19b9f4ebb43da96fa302ccc3d9ee8ba9650c Mon Sep 17 00:00:00 2001 From: gdr Date: Sun, 18 Dec 2005 01:19:20 +0000 Subject: * tree-vn.c (vn_add): Use XNEW. * tree-ssa-ccp.c (ccp_initialize): Use XNEWVEC. (ccp_fold): Likewise. (fold_stmt_r): Use explicit cast to convert from void *. * tree-outof-ssa.c (new_temp_expr_table): Use XCNEWVEC. (new_temp_expr_table): Likewise. * gimplify.c (lookup_tmp_var): Use XNEW. (gimplify_asm_expr): Use explcit cast to convert from void *. * tree-into-ssa.c (get_ssa_name_ann): Likewise. (get_def_blocks_for): Use XNEW. (add_to_repl_tbl): Likewise. (mark_def_sites): Use explicit cast to convert from void *. (def_blocks_free): Likewise. (mark_def_sites_initialize_block): Likewise. (update_ssa): Use XNEWVEC. * tree-dfa.c (create_var_ann): Use GGC_NEW. (create_stmt_ann): Likewise. (create_tree_ann): Likewise. (referenced_var_insert): Likewise. (set_default_def): Likewise. (referenced_var_lookup_if_exists): Use explicit cast to * convert from void *. (referenced_var_lookup): Likewise. (default_def): Likewise. (set_default_def): Likewise. * tree-cfg.c (create_bb): Likewise. (edge_to_cases_cleanup): Likewise. (verify_node_sharing): Likewise. (record_switch_edge): Use XNEW. (cleanup_dead_labels): Use XCNEWVEC. (tree_duplicate_sese_region): Use XNEWVEC. * tree-scalar-evolution.c (get_instantiated_value): Likewise. * tree-ssa.c (verify_ssa): Use XCNEWVEC. (int_tree_map_eq): Use explicit cast to convert from void *. * libgcov.c (gcov_exit): Use explicit cast to convert from * void *. (__gcov_execl): Likewise. (__gcov_execlp): Likewise. (__gcov_execle): Likewise. * tree-eh.c (struct_ptr_eq): Likewise. (struct_ptr_hash): Likewise. (lookup_stmt_eh_region_fn): Likewise. (outside_finally_tree): Likewise. (find_goto_replacement): Likewise. (make_eh_edge): Likewise. (mark_eh_edge): Likewise. (add_stmt_to_eh_region_fn): Use GGC_NEW. (record_in_finally_tree): Use XNEW. (maybe_record_in_goto_queue): Use XRESIZEVEC. (lower_try_finally_copy): Use XCNEWVEC. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108736 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-eh.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'gcc/tree-eh.c') diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 859d68743da..a0469933b1c 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -57,15 +57,15 @@ using_eh_for_cleanups (void) static int struct_ptr_eq (const void *a, const void *b) { - const void * const * x = a; - const void * const * y = b; + const void * const * x = (const void * const *) a; + const void * const * y = (const void * const *) b; return *x == *y; } static hashval_t struct_ptr_hash (const void *a) { - const void * const * x = a; + const void * const * x = (const void * const *) a; return (size_t)*x >> 4; } @@ -100,7 +100,7 @@ add_stmt_to_eh_region_fn (struct function *ifun, tree t, int num) gcc_assert (num >= 0); gcc_assert (TREE_CODE (t) != RESX_EXPR); - n = ggc_alloc (sizeof (*n)); + n = GGC_NEW (struct throw_stmt_node); n->stmt = t; n->region_nr = num; @@ -168,7 +168,8 @@ lookup_stmt_eh_region_fn (struct function *ifun, tree t) return -2; n.stmt = t; - p = htab_find (get_eh_throw_stmt_table (ifun), &n); + p = (struct throw_stmt_node *) htab_find (get_eh_throw_stmt_table (ifun), + &n); return (p ? p->region_nr : -1); } @@ -202,7 +203,7 @@ record_in_finally_tree (tree child, tree parent) struct finally_tree_node *n; void **slot; - n = xmalloc (sizeof (*n)); + n = XNEW (struct finally_tree_node); n->child = child; n->parent = parent; @@ -266,7 +267,7 @@ outside_finally_tree (tree start, tree target) do { n.child = start; - p = htab_find (finally_tree, &n); + p = (struct finally_tree_node *) htab_find (finally_tree, &n); if (!p) return true; start = p->parent; @@ -369,7 +370,8 @@ find_goto_replacement (struct leh_tf_state *tf, tree stmt) { struct goto_queue_node tmp, *ret; tmp.stmt = stmt; - ret = bsearch (&tmp, tf->goto_queue, tf->goto_queue_active, + ret = (struct goto_queue_node *) + bsearch (&tmp, tf->goto_queue, tf->goto_queue_active, sizeof (struct goto_queue_node), goto_queue_cmp); return (ret ? ret->repl_stmt : NULL); } @@ -537,7 +539,7 @@ maybe_record_in_goto_queue (struct leh_state *state, tree stmt) size = (size ? size * 2 : 32); tf->goto_queue_size = size; tf->goto_queue - = xrealloc (tf->goto_queue, size * sizeof (struct goto_queue_node)); + = XRESIZEVEC (struct goto_queue_node, tf->goto_queue, size); } q = &tf->goto_queue[active]; @@ -1058,14 +1060,14 @@ lower_try_finally_copy (struct leh_state *state, struct leh_tf_state *tf) struct goto_queue_node *q, *qe; tree return_val = NULL; int return_index, index; - struct + struct labels_s { struct goto_queue_node *q; tree label; } *labels; return_index = VEC_length (tree, tf->dest_array); - labels = xcalloc (sizeof (*labels), return_index + 1); + labels = XCNEWVEC (struct labels_s, return_index + 1); q = tf->goto_queue; qe = q + tf->goto_queue_active; @@ -1713,7 +1715,7 @@ make_eh_edge (struct eh_region *region, void *data) tree stmt, lab; basic_block src, dst; - stmt = data; + stmt = (tree) data; lab = get_eh_region_tree_label (region); src = bb_for_stmt (stmt); @@ -1755,7 +1757,7 @@ mark_eh_edge (struct eh_region *region, void *data) basic_block src, dst; edge e; - stmt = data; + stmt = (tree) data; lab = get_eh_region_tree_label (region); src = bb_for_stmt (stmt); -- cgit v1.2.1