From 5f754896d3ba9d28ba6bf94923e5e1564cbf4e36 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Wed, 25 Jul 2007 18:14:57 +0000 Subject: c-lex.c (c_lex_with_flags, lex_string): Constify. * c-lex.c (c_lex_with_flags, lex_string): Constify. * c-ppoutput.c (print_line, pp_dir_change): Likewise. * c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise. * cfg.c (bb_copy_original_hash, bb_copy_original_eq): Likewise. * cfgloop.c (loop_exit_hash, loop_exit_eq): Likewise. * ddg.c (compare_sccs): Likewise. * df-scan.c (df_ref_compare, df_mw_compare): Likewise. * dfp.c (decimal_real_from_string, decimal_to_decnumber, decimal_to_binary, decimal_do_compare, decimal_real_to_decimal, decimal_do_fix_trunc, decimal_real_to_integer, decimal_real_to_integer2, decimal_real_maxval): Likewise. * dse.c (const_group_info_t): New. (invariant_group_base_eq, invariant_group_base_hash): Constify. * dwarf2out.c (const_dw_die_ref): New. (decl_die_table_hash, decl_die_table_eq, file_info_cmp): Constify. * tree-browser.c (TB_parent_eq): Likewise. * unwind-dw2-fde.c (__register_frame_info_bases, __deregister_frame_info_bases, fde_unencoded_compare, fde_split, add_fdes, linear_search_fdes, binary_search_unencoded_fdes): Likewise. * unwind-dw2-fde.h (get_cie, next_fde): Likewise. * unwind-dw2.c (uw_frame_state_for): Likewise. * value-prof.c (histogram_hash, histogram_eq): Likewise. * value-prof.h (const_histogram_value): New. From-SVN: r126920 --- gcc/c-lex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gcc/c-lex.c') diff --git a/gcc/c-lex.c b/gcc/c-lex.c index ff8eee6..28b5d98 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -460,7 +460,7 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags) type = lex_string (tok, value, false); break; } - *value = build_string (tok->val.str.len, (char *) tok->val.str.text); + *value = build_string (tok->val.str.len, (const char *) tok->val.str.text); break; case CPP_PRAGMA: @@ -811,7 +811,7 @@ lex_string (const cpp_token *tok, tree *valp, bool objc_string) ? cpp_interpret_string : cpp_interpret_string_notranslate) (parse_in, strs, concats + 1, &istr, wide)) { - value = build_string (istr.len, (char *) istr.text); + value = build_string (istr.len, (const char *) istr.text); free ((void *) istr.text); if (c_lex_string_translate == -1) @@ -824,13 +824,13 @@ lex_string (const cpp_token *tok, tree *valp, bool objc_string) gcc_assert (xlated); if (TREE_STRING_LENGTH (value) != (int) istr.len - || 0 != strncmp (TREE_STRING_POINTER (value), (char *) istr.text, - istr.len)) + || 0 != strncmp (TREE_STRING_POINTER (value), + (const char *) istr.text, istr.len)) { /* Arrange for us to return the untranslated string in *valp, but to set up the C type of the translated one. */ - *valp = build_string (istr.len, (char *) istr.text); + *valp = build_string (istr.len, (const char *) istr.text); valp = &TREE_CHAIN (*valp); } free ((void *) istr.text); -- cgit v1.1