diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-07 16:51:11 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-07 16:51:11 +0000 |
commit | e99c3a1d0a11dad2e2b51f061ad4d3c0a98b67b6 (patch) | |
tree | d04fec1eb92b81beff3e31812e987a40cf880773 /gcc/cp | |
parent | 3bd67e9ceee5b55bc1fcd95eb47d239865de3d37 (diff) | |
download | gcc-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/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/class.c | 2 | ||||
-rw-r--r-- | gcc/cp/decl.c | 10 | ||||
-rw-r--r-- | gcc/cp/init.c | 2 | ||||
-rw-r--r-- | gcc/cp/lex.c | 10 |
5 files changed, 21 insertions, 12 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 959f2efa37c..a7a008f8def 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * 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. + 2001-10-05 Alexandre Oliva <aoliva@redhat.com> * optimize.c (struct inline_data): Moved to ../tree-inline.c. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index ac71fc5baa5..97a35974102 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -435,7 +435,7 @@ static void build_vtable_entry_ref (basetype, idx) tree basetype, idx; { - static char asm_stmt[] = ".vtable_entry %c0, %c1"; + static const char asm_stmt[] = ".vtable_entry %c0, %c1"; tree s, i, i2; tree vtable = get_vtbl_decl_for_binfo (TYPE_BINFO (basetype)); tree first_fn = TYPE_BINFO_VTABLE (basetype); diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 0dfd8d65d32..60cceada0f7 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6227,11 +6227,11 @@ record_unknown_type (type, name) typedef struct predefined_identifier { /* The name of the identifier. */ - const char *name; + const char *const name; /* The place where the IDENTIFIER_NODE should be stored. */ - tree *node; + tree *const node; /* Non-zero if this is the name of a constructor or destructor. */ - int ctor_or_dtor_p; + const int ctor_or_dtor_p; } predefined_identifier; /* Create all the predefined identifiers. */ @@ -6239,10 +6239,10 @@ typedef struct predefined_identifier static void initialize_predefined_identifiers () { - struct predefined_identifier *pid; + const predefined_identifier *pid; /* A table of identifiers to create at startup. */ - static predefined_identifier predefined_identifiers[] = { + static const predefined_identifier predefined_identifiers[] = { { "C++", &lang_name_cplusplus, 0 }, { "C", &lang_name_c, 0 }, { "Java", &lang_name_java, 0 }, diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 487543e6386..8dad82d0711 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2355,7 +2355,7 @@ build_new_1 (exp) tree class_addr, alloc_decl; tree class_decl = build_java_class_ref (true_type); tree class_size = size_in_bytes (true_type); - static char alloc_name[] = "_Jv_AllocObject"; + static const char alloc_name[] = "_Jv_AllocObject"; use_java_new = 1; alloc_decl = IDENTIFIER_GLOBAL_VALUE (get_identifier (alloc_name)); if (alloc_decl == NULL_TREE) diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 6d8fcb36ad7..cb691420243 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -213,7 +213,7 @@ int interface_unknown; /* whether or not we know this class #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, -static char cplus_tree_code_type[] = { +static const char cplus_tree_code_type[] = { 'x', #include "cp-tree.def" }; @@ -225,7 +225,7 @@ static char cplus_tree_code_type[] = { #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH, -static int cplus_tree_code_length[] = { +static const int cplus_tree_code_length[] = { 0, #include "cp-tree.def" }; @@ -390,9 +390,9 @@ init_operators () /* The reserved keyword table. */ struct resword { - const char *word; - ENUM_BITFIELD(rid) rid : 16; - unsigned int disable : 16; + const char *const word; + const ENUM_BITFIELD(rid) rid : 16; + const unsigned int disable : 16; }; /* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is |