From d3bfe4decc2bbbce0585df7814c7923488cb1cb5 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Thu, 26 Jun 2008 00:18:25 +0000 Subject: driver-i386.c (detect_caches_amd, [...]): Fix -Wc++-compat and/or -Wcast-qual warnings. * config/i386/driver-i386.c (detect_caches_amd, detect_caches_intel, host_detect_local_cpu): Fix -Wc++-compat and/or -Wcast-qual warnings. *ggc-common.c (ggc_mark_roots, gt_pch_note_object, gt_pch_note_reorder, relocate_ptrs, write_pch_globals, gt_pch_save): Likewise. * ggc-page.c (push_depth, push_by_depth, alloc_anon, alloc_page, gt_ggc_m_S, clear_marks, ggc_pch_read): Likewise. * global.c (compute_regsets): Likewise. * graph.c (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Likewise. * haifa-sched.c (schedule_block, extend_h_i_d, extend_ready, unlink_bb_notes): Likewise. * integrate.c (get_hard_reg_initial_val): Likewise. * ipa-prop.c (ipa_push_func_to_list): Likewise. * ipa-struct-reorg.c (gen_var_name, gen_cluster_name): Likewise. * local-alloc.c (update_equiv_regs): Likewise. * loop-invariant.c (check_invariant_table_size, hash_invariant_expr, eq_invariant_expr, find_or_insert_inv): Likewise. * loop-iv.c (check_iv_ref_table_size, analyzed_for_bivness_p, altered_reg_used, mark_altered): Likewise. * loop-unroll.c (si_info_eq, ve_info_eq, allocate_basic_variable, insert_var_expansion_initialization, combine_var_copies_in_loop_exit, apply_opt_in_copies, release_var_copies): Likewise. * matrix-reorg.c (mat_acc_phi_hash, mat_acc_phi_eq, mtt_info_eq, analyze_matrix_decl, add_allocation_site, analyze_transpose, analyze_accesses_for_phi_node, check_var_notmodified_p, check_allocation_function, find_sites_in_func, record_all_accesses_in_func, transform_access_sites, transform_allocation_sites): Likewise. * omp-low.c (new_omp_region, create_omp_child_function_name, check_omp_nesting_restrictions, check_combined_parallel, lower_omp_2, diagnose_sb_1, diagnose_sb_2): Likewise. * optabs.c (no_conflict_move_test, gen_libfunc, gen_fp_libfunc, gen_intv_fp_libfunc, gen_interclass_conv_libfunc, gen_intraclass_conv_libfunc, set_optab_libfunc, set_conv_libfunc): Likewise. * opts-common.c (prune_options): Likewise. * opts.c (add_input_filename, print_filtered_help, get_option_state): Likewise. * params.c (add_params): Likewise. * passes.c (set_pass_for_id, next_pass_1, do_per_function_toporder, pass_fini_dump_file): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * predict.c (tree_predicted_by_p, tree_predict_edge, clear_bb_predictions, combine_predictions_for_bb): Likewise. From-SVN: r137134 --- gcc/optabs.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'gcc/optabs.c') diff --git a/gcc/optabs.c b/gcc/optabs.c index 558a708..61c810e 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -3801,7 +3801,7 @@ struct no_conflict_data static void no_conflict_move_test (rtx dest, const_rtx set, void *p0) { - struct no_conflict_data *p= p0; + struct no_conflict_data *p= (struct no_conflict_data *) p0; /* If this inns directly contributes to setting the target, it must stay. */ if (reg_overlap_mentioned_p (p->target, dest)) @@ -5463,7 +5463,7 @@ gen_libfunc (optab optable, const char *opname, int suffix, enum machine_mode mo unsigned opname_len = strlen (opname); const char *mname = GET_MODE_NAME (mode); unsigned mname_len = strlen (mname); - char *libfunc_name = alloca (2 + opname_len + mname_len + 1 + 1); + char *libfunc_name = XALLOCAVEC (char, 2 + opname_len + mname_len + 1 + 1); char *p; const char *q; @@ -5511,7 +5511,7 @@ gen_fp_libfunc (optab optable, const char *opname, char suffix, gen_libfunc (optable, opname, suffix, mode); if (DECIMAL_FLOAT_MODE_P (mode)) { - dec_opname = alloca (sizeof (DECIMAL_PREFIX) + strlen (opname)); + dec_opname = XALLOCAVEC (char, sizeof (DECIMAL_PREFIX) + strlen (opname)); /* For BID support, change the name to have either a bid_ or dpd_ prefix depending on the low level floating format used. */ memcpy (dec_opname, DECIMAL_PREFIX, sizeof (DECIMAL_PREFIX) - 1); @@ -5579,7 +5579,7 @@ gen_intv_fp_libfunc (optab optable, const char *name, char suffix, if (GET_MODE_CLASS (mode) == MODE_INT) { int len = strlen (name); - char *v_name = alloca (len + 2); + char *v_name = XALLOCAVEC (char, len + 2); strcpy (v_name, name); v_name[len] = 'v'; v_name[len + 1] = 0; @@ -5683,13 +5683,13 @@ gen_interclass_conv_libfunc (convert_optab tab, mname_len = strlen (GET_MODE_NAME (tmode)) + strlen (GET_MODE_NAME (fmode)); - nondec_name = alloca (2 + opname_len + mname_len + 1 + 1); + nondec_name = XALLOCAVEC (char, 2 + opname_len + mname_len + 1 + 1); nondec_name[0] = '_'; nondec_name[1] = '_'; memcpy (&nondec_name[2], opname, opname_len); nondec_suffix = nondec_name + opname_len + 2; - dec_name = alloca (2 + dec_len + opname_len + mname_len + 1 + 1); + dec_name = XALLOCAVEC (char, 2 + dec_len + opname_len + mname_len + 1 + 1); dec_name[0] = '_'; dec_name[1] = '_'; memcpy (&dec_name[2], DECIMAL_PREFIX, dec_len); @@ -5808,13 +5808,13 @@ gen_intraclass_conv_libfunc (convert_optab tab, const char *opname, mname_len = strlen (GET_MODE_NAME (tmode)) + strlen (GET_MODE_NAME (fmode)); - nondec_name = alloca (2 + opname_len + mname_len + 1 + 1); + nondec_name = XALLOCAVEC (char, 2 + opname_len + mname_len + 1 + 1); nondec_name[0] = '_'; nondec_name[1] = '_'; memcpy (&nondec_name[2], opname, opname_len); nondec_suffix = nondec_name + opname_len + 2; - dec_name = alloca (2 + dec_len + opname_len + mname_len + 1 + 1); + dec_name = XALLOCAVEC (char, 2 + dec_len + opname_len + mname_len + 1 + 1); dec_name[0] = '_'; dec_name[1] = '_'; memcpy (&dec_name[2], DECIMAL_PREFIX, dec_len); @@ -6026,7 +6026,7 @@ set_optab_libfunc (optab optable, enum machine_mode mode, const char *name) val = 0; slot = (struct libfunc_entry **) htab_find_slot (libfunc_hash, &e, INSERT); if (*slot == NULL) - *slot = ggc_alloc (sizeof (struct libfunc_entry)); + *slot = GGC_NEW (struct libfunc_entry); (*slot)->optab = (size_t) (optable - &optab_table[0]); (*slot)->mode1 = mode; (*slot)->mode2 = VOIDmode; @@ -6053,7 +6053,7 @@ set_conv_libfunc (convert_optab optable, enum machine_mode tmode, val = 0; slot = (struct libfunc_entry **) htab_find_slot (libfunc_hash, &e, INSERT); if (*slot == NULL) - *slot = ggc_alloc (sizeof (struct libfunc_entry)); + *slot = GGC_NEW (struct libfunc_entry); (*slot)->optab = (size_t) (optable - &convert_optab_table[0]); (*slot)->mode1 = tmode; (*slot)->mode2 = fmode; -- cgit v1.1