diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2007-09-03 17:09:20 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2007-09-03 17:09:20 +0000 |
commit | b1d5455a5efad3f380671cf818515a1a6ec94546 (patch) | |
tree | c67ebc05c0f9f25bf5e2c4cfeb978cad7945373c /gcc/fortran | |
parent | d74b97cc7e574d56c7542f40a76b151e7088829b (diff) | |
download | gcc-b1d5455a5efad3f380671cf818515a1a6ec94546.tar.gz |
system.h (CONST_CAST2, [...]): New macros for type-specific casts.
* system.h (CONST_CAST2, CONST_CAST_TREE, CONST_CAST_RTX,
CONST_CAST_BB): New macros for type-specific casts.
(CONST_CAST): Add a TYPE parameter and define it in terms of
CONST_CAST2.
* c-decl.c (c_make_fname_decl): Supply a TYPE for CONST_CAST.
* c-lex.c (cb_ident, lex_string): Likewise,
* c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise,
* config/i386/i386.c (ix86_function_regparm,
ix86_function_sseregparm): Use CONST_CAST_TREE.
* config/mmix/mmix.c (mmix_encode_section_info): Supply a TYPE for
CONST_CAST.
* gcc.c (set_spec, read_specs, for_each_path, execute, do_spec_1,
give_switch, set_multilib_dir): Likewise,
* gengtype-parse.c (string_seq, typedef_name): Likewise,
* gimple-low.c (block_may_fallthru): Use CONST_CAST_TREE.
* jump.c (reversed_comparison_code_parts): Use CONST_CAST_RTX.
* passes.c (execute_one_pass): Supply a TYPE for CONST_CAST.
* prefix.c (update_path): Likewise,
* pretty-print.c (pp_base_destroy_prefix): Likewise,
* rtlanal.c (keep_with_call_p): Use CONST_CAST_RTX.
* tree-cfg.c (tree_can_merge_blocks_p,
tree_block_ends_with_condjump_p): Use CONST_CAST_BB.
* tree-eh.c (lookup_stmt_eh_region_fn): USe CONST_CAST_TREE.
* tree.c (build_string): Supply a TYPE for CONST_CAST.
(attribute_list_contained): Use CONST_CAST_TREE.
cp:
* call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
* decl.c (cp_make_fname_decl): Likewise,
* parser.c (cp_parser_string_literal): Likewise,
* tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
* typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
Likewise,
fortran:
* gfortranspec.c (lang_specific_driver): Use CONST_CAST2.
* options.c (gfc_post_options): Supply a TYPE for CONST_CAST.
* parse.c (parse_omp_structured_block): Likewise,
* st.c (gfc_free_statement): Likewise,
java:
* jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
CONST_CAST.
* jcf.h (JCF_FINISH): Likewise.
From-SVN: r128051
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/gfortranspec.c | 2 | ||||
-rw-r--r-- | gcc/fortran/options.c | 2 | ||||
-rw-r--r-- | gcc/fortran/parse.c | 2 | ||||
-rw-r--r-- | gcc/fortran/st.c | 2 |
5 files changed, 11 insertions, 4 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ce57c1358ca..f3f460a08f5 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * gfortranspec.c (lang_specific_driver): Use CONST_CAST2. + * options.c (gfc_post_options): Supply a TYPE for CONST_CAST. + * parse.c (parse_omp_structured_block): Likewise, + * st.c (gfc_free_statement): Likewise, + 2007-09-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR fortran/31675 diff --git a/gcc/fortran/gfortranspec.c b/gcc/fortran/gfortranspec.c index dc4dcde9d52..be9830386f7 100644 --- a/gcc/fortran/gfortranspec.c +++ b/gcc/fortran/gfortranspec.c @@ -302,7 +302,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv, g77_xargc = argc; g77_xargv = argv; g77_newargc = 0; - g77_newargv = (const char **) CONST_CAST (argv); + g77_newargv = CONST_CAST2 (const char **, const char *const *, argv); /* First pass through arglist. diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index a68c3bed781..2d11ad7dfd6 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -244,7 +244,7 @@ gfc_post_options (const char **pfilename) gfc_add_include_path (".", true); if (canon_source_file != gfc_source_file) - gfc_free (CONST_CAST (canon_source_file)); + gfc_free (CONST_CAST (char *, canon_source_file)); /* Decide which form the file will be read in as. */ diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index df7f68f156e..38e62cde597 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -2636,7 +2636,7 @@ parse_omp_structured_block (gfc_statement omp_st, bool workshare_stmts_only) && strcmp (cp->ext.omp_name, new_st.ext.omp_name) != 0)) gfc_error ("Name after !$omp critical and !$omp end critical does " "not match at %C"); - gfc_free (CONST_CAST (new_st.ext.omp_name)); + gfc_free (CONST_CAST (char *, new_st.ext.omp_name)); break; case EXEC_OMP_END_SINGLE: cp->ext.omp_clauses->lists[OMP_LIST_COPYPRIVATE] diff --git a/gcc/fortran/st.c b/gcc/fortran/st.c index 80844534c06..777e4eb8a25 100644 --- a/gcc/fortran/st.c +++ b/gcc/fortran/st.c @@ -173,7 +173,7 @@ gfc_free_statement (gfc_code *p) break; case EXEC_OMP_CRITICAL: - gfc_free (CONST_CAST (p->ext.omp_name)); + gfc_free (CONST_CAST (char *, p->ext.omp_name)); break; case EXEC_OMP_FLUSH: |