From f883e0a7dc171a20708b7d60fccdca05bb71de32 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Thu, 26 Jun 2008 00:28:15 +0000 Subject: alias.c (record_alias_subset, [...]): Fix -Wc++-compat and/or -Wcast-qual warnings. * alias.c (record_alias_subset, init_alias_analysis): Fix -Wc++-compat and/or -Wcast-qual warnings. * attribs.c (lookup_attribute_spec): Likewise. * bb-reorder.c (find_traces, rotate_loop, find_traces_1_round, copy_bb, connect_traces, find_rarely_executed_basic_blocks_and_cr): Likewise. * bt-load.c (find_btr_def_group, add_btr_def, new_btr_user, note_btr_set, migrate_btr_defs): Likewise. * builtins.c (result_vector, expand_builtin_memcpy, expand_builtin_mempcpy_args, expand_builtin_strncpy, builtin_memset_read_str, expand_builtin_printf, fold_builtin_memchr, rewrite_call_expr, fold_builtin_printf): Likewise. * caller-save.c (mark_set_regs): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cgraph.c (cgraph_edge): Likewise. * combine.c (likely_spilled_retval_1): Likewise. * coverage.c (htab_counts_entry_hash, htab_counts_entry_eq, htab_counts_entry_del, get_coverage_counts): Likewise. * cselib.c (new_elt_list, new_elt_loc_list, entry_and_rtx_equal_p, new_cselib_val): Likewise. * dbgcnt.c (dbg_cnt_process_opt): Likewise. * dbxout.c (dbxout_init, dbxout_type, output_used_types_helper): Likewise. * df-core.c (df_compact_blocks): Likewise. * df-problems.c (df_grow_bb_info, df_chain_create): Likewise. * df-scan.c (df_grow_reg_info, df_ref_create, df_insn_create_insn_record, df_insn_rescan, df_notes_rescan, df_ref_compare, df_ref_create_structure, df_bb_refs_record, df_record_entry_block_defs, df_record_exit_block_uses, df_bb_verify): Likewise. * df.h (DF_REF_EXTRACT_WIDTH_CONST, DF_REF_EXTRACT_OFFSET_CONST, DF_REF_EXTRACT_MODE_CONST): New. * dominance.c (get_immediate_dominator, get_dominated_by, nearest_common_dominator, root_of_dom_tree, iterate_fix_dominators, first_dom_son, next_dom_son): Fix -Wc++-compat and/or -Wcast-qual warnings. * dse.c (clear_alias_set_lookup, get_group_info, gen_rtx_MEM, record_store, replace_read, check_mem_read_rtx, scan_insn, dse_step1, dse_record_singleton_alias_set): Likewise. * dwarf2asm.c (dw2_force_const_mem): Likewise. From-SVN: r137137 --- gcc/dse.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'gcc/dse.c') diff --git a/gcc/dse.c b/gcc/dse.c index 841e466..b65a72b 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -592,7 +592,7 @@ clear_alias_set_lookup (alias_set_type alias_set) slot = htab_find_slot (clear_alias_mode_table, &tmp_holder, NO_INSERT); gcc_assert (*slot); - return *slot; + return (struct clear_alias_mode_holder *) *slot; } @@ -638,7 +638,8 @@ get_group_info (rtx base) { if (!clear_alias_group) { - clear_alias_group = gi = pool_alloc (rtx_group_info_pool); + clear_alias_group = gi = + (group_info_t) pool_alloc (rtx_group_info_pool); memset (gi, 0, sizeof (struct group_info)); gi->id = rtx_group_next_id++; gi->store1_n = BITMAP_ALLOC (NULL); @@ -658,7 +659,7 @@ get_group_info (rtx base) if (gi == NULL) { - *slot = gi = pool_alloc (rtx_group_info_pool); + *slot = gi = (group_info_t) pool_alloc (rtx_group_info_pool); gi->rtx_base = base; gi->id = rtx_group_next_id++; gi->base_mem = gen_rtx_MEM (QImode, base); @@ -1246,7 +1247,7 @@ record_store (rtx body, bb_info_t bb_info) if (clear_alias_group->offset_map_size_p < spill_alias_set) clear_alias_group->offset_map_size_p = spill_alias_set; - store_info = pool_alloc (rtx_store_info_pool); + store_info = (store_info_t) pool_alloc (rtx_store_info_pool); if (dump_file) fprintf (dump_file, " processing spill store %d(%s)\n", @@ -1260,7 +1261,7 @@ record_store (rtx body, bb_info_t bb_info) group_info_t group = VEC_index (group_info_t, rtx_group_vec, group_id); - store_info = pool_alloc (rtx_store_info_pool); + store_info = (store_info_t) pool_alloc (rtx_store_info_pool); set_usage_bits (group, offset, width); if (dump_file) @@ -1277,7 +1278,7 @@ record_store (rtx body, bb_info_t bb_info) insn_info->stack_pointer_based = true; insn_info->contains_cselib_groups = true; - store_info = pool_alloc (cse_store_info_pool); + store_info = (store_info_t) pool_alloc (cse_store_info_pool); group_id = -1; if (dump_file) @@ -1603,7 +1604,8 @@ replace_read (store_info_t store_info, insn_info_t store_insn, if (validate_change (read_insn->insn, loc, read_reg, 0)) { - deferred_change_t deferred_change = pool_alloc (deferred_change_pool); + deferred_change_t deferred_change = + (deferred_change_t) pool_alloc (deferred_change_pool); /* Insert this right before the store insn where it will be safe from later insns that might change it before the read. */ @@ -1713,7 +1715,7 @@ check_mem_read_rtx (rtx *loc, void *data) else width = GET_MODE_SIZE (GET_MODE (mem)); - read_info = pool_alloc (read_info_pool); + read_info = (read_info_t) pool_alloc (read_info_pool); read_info->group_id = group_id; read_info->mem = mem; read_info->alias_set = spill_alias_set; @@ -1933,7 +1935,7 @@ static void scan_insn (bb_info_t bb_info, rtx insn) { rtx body; - insn_info_t insn_info = pool_alloc (insn_info_pool); + insn_info_t insn_info = (insn_info_t) pool_alloc (insn_info_pool); int mems_found = 0; memset (insn_info, 0, sizeof (struct insn_info)); @@ -2124,7 +2126,7 @@ dse_step1 (void) FOR_ALL_BB (bb) { insn_info_t ptr; - bb_info_t bb_info = pool_alloc (bb_info_pool); + bb_info_t bb_info = (bb_info_t) pool_alloc (bb_info_pool); memset (bb_info, 0, sizeof (struct bb_info)); bitmap_set_bit (all_blocks, bb->index); @@ -2425,7 +2427,8 @@ dse_record_singleton_alias_set (alias_set_type alias_set, slot = htab_find_slot (clear_alias_mode_table, &tmp_holder, INSERT); gcc_assert (*slot == NULL); - *slot = entry = pool_alloc (clear_alias_mode_pool); + *slot = entry = + (struct clear_alias_mode_holder *) pool_alloc (clear_alias_mode_pool); entry->alias_set = alias_set; entry->mode = mode; } -- cgit v1.1