summaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-07 16:51:11 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-07 16:51:11 +0000
commite99c3a1d0a11dad2e2b51f061ad4d3c0a98b67b6 (patch)
treed04fec1eb92b81beff3e31812e987a40cf880773 /gcc/gcc.c
parent3bd67e9ceee5b55bc1fcd95eb47d239865de3d37 (diff)
downloadgcc-e99c3a1d0a11dad2e2b51f061ad4d3c0a98b67b6.tar.gz
* builtins.c (expand_builtin_setjmp_receiver): Const-ify.
* c-common.c (fname_var_t, c_tree_code_type, c_tree_code_length): Likewise. * c-dump.c (dump_option_value_info): Likewise. * c-format.c (format_length_info, format_char_info, format_flag_spec, format_flag_pair, format_kind_info): Likewise. * collect2.c (names): Likewise. * cppdefault.h (default_include): Likewise. * cppexp.c (suffix, vsuf_1, vsuf_2, vsuf_3): Likewise. * flow.c (life_analysis): Likewise. * gcc.c (dir_separator_str, modify_target, option_map, target_option_translations, spec_list_1, extra_specs_1, init_spec): Likewise. * gcov.c (gcov_version_string): Likewise. * genattr.c (write_units): Likewise. * genattrtab.c (make_length_attrs, write_function_unit_info): Likewise. * gengenrtl.c (rtx_definition, defs): Likewise. * genrecog.c (pred_table): Likewise. * global.c (global_alloc): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (find_free_reg): Likewise. * params.h (param_info): Likewise. * predict.c (predictor_info): Likewise. * protoize.c (unexpansion_struct): Likewise. * real.c (bmask): Likewise. * recog.h (insn_operand_data, insn_data): Likewise. * regclass.c (initial_fixed_regs, initial_call_used_regs): Likewise. * stmt.c (expand_nl_goto_receiver): Likewise. * toplev.c (da, debug_args, lang_opt, documented_lang_options, target_switches, target_options): Likewise. * tradcif.y (token, tokentab2, yylex): Likewise. * tree.h (attribute_spec): Likewise. * alpha.c (override_options, alpha_lookup_xfloating_lib_func): Likewise. * arc.c (arc_output_function_epilogue): Likewise. * arm.c (processors, all_cores, all_architectures, arm_override_options, isr_attribute_arg, isr_attribute_args, arm_isr_value): Likewise. * avr.c (mcu_type_s, reg_class_tab, order_regs_for_local_alloc): Likewise. * c4x.c (c4x_int_reglist): Likewise. * d30v.c (override_options): Likewise. * h8300.c (shift_insn): Likewise. * i386.c (size_cost, i386_cost, i486_cost, pentium_cost, pentiumpro_cost, k6_cost, athlon_cost, pentium4_cost, ix86_cost, ix86_expand_sse_comi, ix86_expand_sse_compare, override_options, builtin_description, bdesc_comi, bdesc_2arg, bdesc_1arg, ix86_init_mmx_sse_builtins, ix86_expand_builtin): Likewise. * i386.h (processor_costs, ix86_cost): Likewise. * m68hc11.c (m68hc11_cost, m6811_cost, m6812_cost): Likewise. * m68hc11.h (processor_costs, m68hc11_cost): Likewise. * m68k.c (codes_68881, codes_FPA): Likewise. * m88k.c (mode_from_align, max_from_align, all_from_align, best_from_align, m_options): Likewise. * m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise. * mcore.c (mode_from_align): Likewise. * mips/elf64.h (UNIQUE_SECTION): Likewise. * mips/iris6gld.h (UNIQUE_SECTION): Likewise. * mips.c (mips_sw_reg_names, mips_regno_to_class): Likewise. * mips.h (mips_regno_to_class): Likewise. * ns32k.c (scales): Likewise. * pa.c (import_string, magic_milli): Likewise. * rs6000.c (alt_reg_names, rs6000_override_options): Likewise. * sparc.c (leaf_reg_remap, sparc_override_options, reg_leaf_alloc_order, reg_nonleaf_alloc_order, reg_alloc_orders): Likewise. * sparc.h (sparc_cpu_select, leaf_reg_remap): Likewise. cp: * class.c (build_vtable_entry_ref): Const-ify. * decl.c (predefined_identifier, initialize_predefined_identifiers): Likewise. * init.c (build_new_1): Likewise. * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword): Likewise. f: * bad.c (_ffebad_message_, ffebad_messages_): Const-ify. * bld.c (ffebld_arity_op_): Likewise. * bld.h (ffebld_arity_op_): Likewise. * com.c (ffecom_init_0): Likewise. * intdoc.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, _ffeintrin_imp_, names, gens, imps, specs, cc_pair, cc_descriptions, cc_summaries): Likewise. * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, _ffeintrin_imp_, ffeintrin_names_, ffeintrin_gens_, ffeintrin_imps_, ffeintrin_specs_): Likewise. java: * jcf-io.c (format_uint): Const-ify. * lang.c (java_tree_code_type, java_tree_code_length): Likewise. * lex.c (java_get_line_col): Likewise. * parse.y (build_incdec): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46062 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index cabbe18c902..b740218ca2a 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -122,7 +122,7 @@ extern int getrusage PARAMS ((int, struct rusage *));
#endif /* DIR_UP */
#endif /* VMS */
-static char dir_separator_str[] = { DIR_SEPARATOR, 0 };
+static const char dir_separator_str[] = { DIR_SEPARATOR, 0 };
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
@@ -226,11 +226,11 @@ static const char *cross_compile = "0";
switch. The only case we support now is simply appending or deleting a
string to or from the end of the first part of the configuration name. */
-struct modify_target
+const struct modify_target
{
- const char *sw;
- enum add_del {ADD, DELETE} add_del;
- const char *str;
+ const char *const sw;
+ const enum add_del {ADD, DELETE} add_del;
+ const char *const str;
}
modify_target[] = MODIFY_TARGET_NAME;
#endif
@@ -857,21 +857,21 @@ static char **preprocessor_options;
struct option_map
{
/* The long option's name. */
- const char *name;
+ const char *const name;
/* The equivalent short option. */
- const char *equivalent;
+ const char *const equivalent;
/* Argument info. A string of flag chars; NULL equals no options.
a => argument required.
o => argument optional.
j => join argument to equivalent, making one word.
* => require other text after NAME as an argument. */
- const char *arg_info;
+ const char *const arg_info;
};
/* This is the table of mappings. Mappings are tried sequentially
for each option encountered; the first one that matches, wins. */
-struct option_map option_map[] =
+static const struct option_map option_map[] =
{
{"--all-warnings", "-Wall", 0},
{"--ansi", "-ansi", 0},
@@ -954,9 +954,9 @@ struct option_map option_map[] =
#ifdef TARGET_OPTION_TRANSLATE_TABLE
-static struct {
- const char *option_found;
- const char *replacements;
+static const struct {
+ const char *const option_found;
+ const char *const replacements;
} target_option_translations[] =
{
TARGET_OPTION_TRANSLATE_TABLE,
@@ -1361,11 +1361,11 @@ static struct spec_list static_specs[] =
That is all that the EXTRA_SPECS macro gives us. */
struct spec_list_1
{
- const char *name;
- const char *ptr;
+ const char *const name;
+ const char *const ptr;
};
-static struct spec_list_1 extra_specs_1[] = { EXTRA_SPECS };
+static const struct spec_list_1 extra_specs_1[] = { EXTRA_SPECS };
static struct spec_list *extra_specs = (struct spec_list *) 0;
#endif
@@ -1519,7 +1519,7 @@ init_spec ()
#ifdef USE_AS_TRADITIONAL_FORMAT
/* Prepend "--traditional-format" to whatever asm_spec we had before. */
{
- static char tf[] = "--traditional-format ";
+ static const char tf[] = "--traditional-format ";
obstack_grow (&obstack, tf, sizeof(tf) - 1);
obstack_grow0 (&obstack, asm_spec, strlen (asm_spec));
asm_spec = obstack_finish (&obstack);