summaryrefslogtreecommitdiff
path: root/gcc/gengtype.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2008-06-26 00:22:12 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2008-06-26 00:22:12 +0000
commit7cbb2a85e7bb2f135308812d2847fc16a44dbe0a (patch)
treefb71542f91c1a9dcc70d28cb64513626a2cdcfb8 /gcc/gengtype.c
parentd3bfe4decc2bbbce0585df7814c7923488cb1cb5 (diff)
downloadgcc-7cbb2a85e7bb2f135308812d2847fc16a44dbe0a.tar.gz
cse.c (approx_reg_cost_1, cse_insn): Fix -Wc++-compat and/or -Wcast-qual warnings.
* cse.c (approx_reg_cost_1, cse_insn): Fix -Wc++-compat and/or -Wcast-qual warnings. * gcc.c (process_command): Likewise. * genattrtab.c (oballoc): Use XOBNEW. (oballocvec): Define. (attr_hash_add_rtx, attr_hash_add_string, attr_string, get_attr_value, fill_attr, make_length_attrs, gen_attr, gen_insn, gen_delay, find_attr, gen_insn_reserv, gen_bypass_1): Fix -Wc++-compat and/or -Wcast-qual warnings. * genautomata.c (XCREATENODE, XCREATENODEVEC, XCREATENODEVAR, XCOPYNODE, XCOPYNODEVEC, XCOPYNODEVAR): New. (gen_cpu_unit, gen_query_cpu_unit, gen_bypass, gen_excl_set, gen_presence_absence_set, gen_automaton, gen_regexp_el, gen_regexp_repeat, gen_regexp_allof, gen_regexp_oneof, gen_regexp_sequence, gen_reserv, gen_insn_reserv, process_excls, add_excls, process_presence_absence_names, process_presence_absence_patterns, add_presence_absence, process_regexp, add_advance_cycle_insn_decl, get_free_alt_state, get_free_state, add_arc, get_free_automata_list_el, form_reserv_sets_list, copy_insn_regexp, transform_1, transform_2, transform_3, cache_presence, create_ainsns, create_automata, create_state_ainsn_table, dfa_insn_code_enlarge, output_trans_func, output_min_issue_delay_func, output_dead_lock_func, output_reset_func, output_get_cpu_unit_code_func, output_dfa_start_func, expand_automata): Likewise. * genextract.c (gen_insn): Likewise. * gengtype-lex.l: Likewise. * gengtype.c (read_input_list, adjust_field_type, process_gc_options): Likewise. * genoutput.c (note_constraint): Likewise. * genpreds.c (mangle, add_constraint): Likewise. * genrecog.c (process_define_predicate, new_decision, add_to_sequence): Likewise. * gensupport.c (record_insn_name): Likewise. From-SVN: r137135
Diffstat (limited to 'gcc/gengtype.c')
-rw-r--r--gcc/gengtype.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index dc428a8b608..72d10781241 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -439,7 +439,7 @@ read_input_list (const char *listname)
: lang_dir_names[langno - 1]);
bmap |= curlangs;
- set_lang_bitmap ((char *)gt_files[i], bmap);
+ set_lang_bitmap (CONST_CAST(char *, gt_files[i]), bmap);
here = committed;
goto next_line;
}
@@ -1272,9 +1272,9 @@ adjust_field_type (type_p t, options_p opt)
if (params[num] != NULL)
error_at_line (&lexer_line, "duplicate `%s' option", opt->name);
if (! ISDIGIT (opt->name[5]))
- params[num] = create_pointer ((type_p) opt->info);
+ params[num] = create_pointer (CONST_CAST2(type_p, const char *, opt->info));
else
- params[num] = (type_p) opt->info;
+ params[num] = CONST_CAST2 (type_p, const char *, opt->info);
}
else if (strcmp (opt->name, "special") == 0)
{
@@ -1323,7 +1323,8 @@ process_gc_options (options_p opt, enum gc_used_enum level, int *maybe_undef,
options_p o;
for (o = opt; o; o = o->next)
if (strcmp (o->name, "ptr_alias") == 0 && level == GC_POINTED_TO)
- set_gc_used_type ((type_p) o->info, GC_POINTED_TO, NULL);
+ set_gc_used_type (CONST_CAST2 (type_p, const char *, o->info),
+ GC_POINTED_TO, NULL);
else if (strcmp (o->name, "maybe_undef") == 0)
*maybe_undef = 1;
else if (strcmp (o->name, "use_params") == 0)