diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2007-08-10 17:53:58 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2007-08-10 17:53:58 +0000 |
commit | 68a57691dc5d712bff5c70691dd90c0c670022d0 (patch) | |
tree | 53bd7b9b59c9d1379b40355a4bdf1833b81d993b /gcc/java | |
parent | df54b9ab94b46279d2af4977d8bdd4187151a5a7 (diff) | |
download | gcc-68a57691dc5d712bff5c70691dd90c0c670022d0.zip gcc-68a57691dc5d712bff5c70691dd90c0c670022d0.tar.gz gcc-68a57691dc5d712bff5c70691dd90c0c670022d0.tar.bz2 |
system.h (CONST_CAST): New.
* system.h (CONST_CAST): New.
* c-decl.c (c_make_fname_decl): Use it.
* c-lex.c (cb_ident, lex_string): Likewise.
* c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise.
* 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.
* passes.c (execute_one_pass): Likewise.
* prefix.c (update_path): Likewise.
* pretty-print.c (pp_base_destroy_prefix): Likewise.
* tree.c (build_string): Likewise.
cp:
* call.c (name_as_c_string): Use CONST_CAST.
* decl.c (build_decl): Likewise.
* parser.c (cp_parser_string_literal): Likewise.
fortran:
* gfortranspec.c (lang_specific_driver): Use CONST_CAST.
* options.c (gfc_post_options): Likewise.
* parse.c (parse_omp_structured_block): Likewise.
* st.c (gfc_free_statement): Likewise.
java:
* jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
* jcf.h (JCF_FINISH): Likewise.
From-SVN: r127344
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/jcf-parse.c | 4 | ||||
-rw-r--r-- | gcc/java/jcf.h | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 102fdc2..93428ad 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST. + * jcf.h (JCF_FINISH): Likewise. + 2007-07-31 Nick Clifton <nickc@redhat.com> * java-gimplify.c: Change copyright header to refer to version 3 diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 5660431..c31645f 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -1301,7 +1301,7 @@ read_class (tree name) if (path_name == 0) return 0; else - free((char *) path_name); + free(CONST_CAST (path_name)); } current_jcf = jcf; @@ -1783,7 +1783,7 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED) file_list = list; } else - list = (char *) main_input_filename; + list = (char *) CONST_CAST (main_input_filename); while (list) { diff --git a/gcc/java/jcf.h b/gcc/java/jcf.h index b4e718d..af9dadd 100644 --- a/gcc/java/jcf.h +++ b/gcc/java/jcf.h @@ -164,8 +164,8 @@ typedef struct JCF GTY(()) { #define JCF_FINISH(JCF) { \ CPOOL_FINISH(&(JCF)->cpool); \ if ((JCF)->buffer) free ((JCF)->buffer); \ - if ((JCF)->filename) free ((char *) (JCF)->filename); \ - if ((JCF)->classname) free ((char *) (JCF)->classname); \ + if ((JCF)->filename) free (CONST_CAST ((JCF)->filename)); \ + if ((JCF)->classname) free (CONST_CAST ((JCF)->classname)); \ (JCF)->finished = 1; } #define CPOOL_INIT(CPOOL) \ |