aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2007-07-25 19:06:06 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2007-07-25 19:06:06 +0000
commit741ac903839251f16d331f4d1c11f444eaec684f (patch)
tree376f2dafdfe0716aa1dd01defc992cc04d880df7 /gcc/fortran
parent39f86293e53c0869d6a17ba386c41beed76b9de4 (diff)
downloadgcc-741ac903839251f16d331f4d1c11f444eaec684f.zip
gcc-741ac903839251f16d331f4d1c11f444eaec684f.tar.gz
gcc-741ac903839251f16d331f4d1c11f444eaec684f.tar.bz2
c-common.c (fname_as_string, [...]): Constify.
* c-common.c (fname_as_string, c_type_hash): Constify. * c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise. * cgraph.c (edge_hash, edge_eq): Likewise. * dwarf2out.c (decl_die_table_eq, decl_loc_table_eq): Likewise. * emit-rtl.c (mem_attrs_htab_eq, reg_attrs_htab_hash, reg_attrs_htab_eq): Likewise. * except.c (t2r_eq, t2r_hash, ttypes_filter_eq, ehl_hash, ehl_eq): Likewise. * genautomata.c (const_reserv_sets_t, const_unit_decl_t, const_decl_t, const_state_t, const_automata_list_el_t): New. (first_out_arc, DECL_UNIT, DECL_BYPASS, DECL_AUTOMATON, DECL_EXCL, DECL_PRESENCE, DECL_ABSENCE, DECL_RESERV, DECL_INSN_RESERV, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, alt_state_cmp, reserv_sets_cmp, reserv_sets_eq, state_hash, state_eq_p, automata_list_hash, automata_list_eq_p, compare_states_for_equiv, compare_max_occ_cycle_nums, out_state_arcs_num, compare_transition_els_num, units_cmp, state_reservs_cmp): Constify. * genmodes.c (cmp_modes): Likewise. * ggc-common.c (saving_htab_hash, saving_htab_eq): Likewise. * gimplify.c (compare_case_labels): Likewise. * ipa-type-escape.c (get_name_of_type, type_brand_s): Likewise. * loop-unroll.c (si_info_hash, ve_info_hash): Likewise. * matrix-reorg.c (mtt_info_hash): Likewise. * postreload-gcse.c (hash_expr_for_htab, expr_equiv_p): Likewise. * rtl-factoring.c (const_p_hash_bucket, const_p_hash_elem): New. (htab_hash_bucket, htab_hash_elem): Constify. * tree-browser.c (TB_parent_eq): Likewise. * tree-scalar-evolution.c (hash_scev_info): Likewise. * tree-ssa-alias.c (sort_tags_by_id): Likewise. * tree-ssa-coalesce.c (const_coalesce_pair_p): New. (coalesce_pair_map_hash, coalesce_pair_map_eq, compare_pairs): Constify. * tree-ssa-dom.c (avail_expr_hash, avail_expr_eq): Likewise. * tree-ssa-pre.c (const_expr_pred_trans_t): New. (expr_pred_trans_hash, expr_pred_trans_eq): Constify. * tree-ssa-sccvn.c (const_vn_binary_op_t, const_vn_unary_op_t, const_vn_phi_t, const_vn_reference_op_t, const_vn_reference_t): New. (vn_reference_op_eq, vn_reference_hash, vn_reference_eq, vn_unary_op_hash, vn_unary_op_eq, vn_binary_op_hash, vn_binary_op_eq, vn_phi_hash, vn_phi_eq): Constify. * tree-ssa-threadupdate.c (redirection_data_hash, redirection_data_eq): Likewise. * tree-ssa-uncprop.c (equiv_hash, equiv_eq): Likewise. * tree-ssa.c (var_ann_eq): Likewise. * tree-vrp.c (compare_case_labels): Likewise. * tree.c (int_cst_hash_hash, int_cst_hash_eq, tree_map_base_marked_p, type_hash_marked_p, tree_check_failed, tree_not_check_failed, tree_class_check_failed, tree_range_check_failed, tree_not_class_check_failed, omp_clause_check_failed, omp_clause_range_check_failed, tree_contains_struct_check_failed, tree_operand_check_failed): Likewise. * tree.h (tree_contains_struct_check_failed, tree_check_failed, tree_not_check_failed, tree_class_check_failed, tree_range_check_failed, tree_not_class_check_failed, tree_operand_check_failed, omp_clause_operand_check_failed, tree_operand_length): Likewise. * var-tracking.c (const_variable): New. (variable_htab_hash, variable_htab_eq): Constify. * varasm.c (const_desc_hash): Likewise. cp: * decl.c (typename_hash, typename_compare): Constify. * mangle.c (hash_type, compare_type): Likewise. * pt.c (eq_local_specializations, hash_local_specialization): Likewise. * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq, list_hash): Likewise. * typeck2.c (pat_compare): Likewise. fortran: * gfortran.h (generate_isocbinding_symbol): Constify. * symbol.c (gen_special_c_interop_ptr, gen_cptr_param, generate_isocbinding_symbol): Likewise. java: * class.c (java_treetreehash_hash, java_treetreehash_compare): Constify. * expr.c (type_assertion_eq): Likewise. * jcf-io.c (compare_path): Likewise. * jcf-parse.c (cmpstringp): Likewise. * verify-impl.c (get_one_type, compute_argument_types, compute_return_type): Likewise. objc: * objc-act.c (volatilized_hash, volatilized_eq, string_hash, string_eq): Constify. From-SVN: r126925
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/gfortran.h2
-rw-r--r--gcc/fortran/symbol.c12
3 files changed, 13 insertions, 7 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 7050f52..cb7cae7 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gfortran.h (generate_isocbinding_symbol): Constify.
+ * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
+ generate_isocbinding_symbol): Likewise.
+
2007-07-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31205
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index f475c1e..a0b79e5 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -2137,7 +2137,7 @@ try verify_c_interop_param (gfc_symbol *);
try verify_bind_c_sym (gfc_symbol *, gfc_typespec *, int, gfc_common_head *);
try verify_bind_c_derived_type (gfc_symbol *);
try verify_com_block_vars_c_interop (gfc_common_head *);
-void generate_isocbinding_symbol (const char *, iso_c_binding_symbol, char *);
+void generate_isocbinding_symbol (const char *, iso_c_binding_symbol, const char *);
gfc_symbol *get_iso_c_sym (gfc_symbol *, char *, char *, int);
int gfc_get_sym_tree (const char *, gfc_namespace *, gfc_symtree **);
int gfc_get_ha_symbol (const char *, gfc_symbol **);
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index af42e9b..3674b31 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -3235,7 +3235,7 @@ gen_special_c_interop_ptr (int ptr_id, const char *ptr_name,
current ns. */
generate_isocbinding_symbol (module_name, ptr_id == ISOCBINDING_NULL_PTR
? ISOCBINDING_PTR : ISOCBINDING_FUNPTR,
- (char *) (ptr_id == ISOCBINDING_NULL_PTR
+ (const char *) (ptr_id == ISOCBINDING_NULL_PTR
? "_gfortran_iso_c_binding_c_ptr"
: "_gfortran_iso_c_binding_c_funptr"));
@@ -3356,10 +3356,10 @@ gen_cptr_param (gfc_formal_arglist **head,
trying to use one of the iso_c_binding functions that need it. */
if (iso_c_sym_id == ISOCBINDING_F_PROCPOINTER)
generate_isocbinding_symbol (module_name, ISOCBINDING_FUNPTR,
- (char *)c_ptr_type);
+ (const char *)c_ptr_type);
else
generate_isocbinding_symbol (module_name, ISOCBINDING_PTR,
- (char *)c_ptr_type);
+ (const char *)c_ptr_type);
gfc_get_ha_symbol (c_ptr_type, &(c_ptr_sym));
}
@@ -3579,9 +3579,9 @@ build_formal_args (gfc_symbol *new_proc_sym,
void
generate_isocbinding_symbol (const char *mod_name, iso_c_binding_symbol s,
- char *local_name)
+ const char *local_name)
{
- char *name = (local_name && local_name[0]) ? local_name
+ const char *const name = (local_name && local_name[0]) ? local_name
: c_interop_kinds_table[s].name;
gfc_symtree *tmp_symtree = NULL;
gfc_symbol *tmp_sym = NULL;
@@ -3803,7 +3803,7 @@ generate_isocbinding_symbol (const char *mod_name, iso_c_binding_symbol s,
generate_isocbinding_symbol
(mod_name, s == ISOCBINDING_FUNLOC
? ISOCBINDING_FUNPTR : ISOCBINDING_PTR,
- (char *)(s == ISOCBINDING_FUNLOC
+ (const char *)(s == ISOCBINDING_FUNLOC
? "_gfortran_iso_c_binding_c_funptr"
: "_gfortran_iso_c_binding_c_ptr"));
tmp_sym->ts.derived =