aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2008-06-26 00:18:25 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2008-06-26 00:18:25 +0000
commitd3bfe4decc2bbbce0585df7814c7923488cb1cb5 (patch)
tree8bec70e2b9f614f364abd830f6241a61d7d1d986 /gcc/config
parent04298b116a9a550e575224a07537e89461701016 (diff)
downloadgcc-d3bfe4decc2bbbce0585df7814c7923488cb1cb5.zip
gcc-d3bfe4decc2bbbce0585df7814c7923488cb1cb5.tar.gz
gcc-d3bfe4decc2bbbce0585df7814c7923488cb1cb5.tar.bz2
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
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/driver-i386.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index b823d43..44845cd 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -70,7 +70,7 @@ decode_l2_cache (unsigned *l2_size, unsigned *l2_line, unsigned *l2_assoc)
/* Returns the description of caches for an AMD processor. */
-static char *
+static const char *
detect_caches_amd (unsigned max_ext_level)
{
unsigned eax, ebx, ecx, edx;
@@ -78,7 +78,7 @@ detect_caches_amd (unsigned max_ext_level)
unsigned l2_sizekb, l2_line, l2_assoc;
if (max_ext_level < 0x80000005)
- return (char *) "";
+ return "";
__cpuid (0x80000005, eax, ebx, ecx, edx);
@@ -282,7 +282,7 @@ decode_caches_intel (unsigned reg, unsigned *l1_sizekb, unsigned *l1_line,
/* Returns the description of caches for an intel processor. */
-static char *
+static const char *
detect_caches_intel (unsigned max_level, unsigned max_ext_level)
{
unsigned eax, ebx, ecx, edx;
@@ -290,7 +290,7 @@ detect_caches_intel (unsigned max_level, unsigned max_ext_level)
unsigned l2_sizekb = 0, l2_line = 0, l2_assoc = 0;
if (max_level < 2)
- return (char *) "";
+ return "";
__cpuid (2, eax, ebx, ecx, edx);
@@ -304,7 +304,7 @@ detect_caches_intel (unsigned max_level, unsigned max_ext_level)
&l2_sizekb, &l2_line, &l2_assoc);
if (!l1_sizekb)
- return (char *) "";
+ return "";
/* Newer Intel CPUs are equipped with AMD style L2 cache info */
if (max_ext_level >= 0x80000006)
@@ -393,13 +393,13 @@ const char *host_detect_local_cpu (int argc, const char **argv)
if (!arch)
{
- if (vendor == *(unsigned int*) "Auth")
+ if (vendor == *(const unsigned int*) "Auth")
cache = detect_caches_amd (ext_level);
- else if (vendor == *(unsigned int*) "Genu")
+ else if (vendor == *(const unsigned int*) "Genu")
cache = detect_caches_intel (max_level, ext_level);
}
- if (vendor == *(unsigned int*) "Auth")
+ if (vendor == *(const unsigned int*) "Auth")
{
processor = PROCESSOR_PENTIUM;
@@ -412,7 +412,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
if (has_sse4a)
processor = PROCESSOR_AMDFAM10;
}
- else if (vendor == *(unsigned int*) "Geod")
+ else if (vendor == *(const unsigned int*) "Geod")
processor = PROCESSOR_GEODE;
else
{