aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2007-08-10 17:53:58 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2007-08-10 17:53:58 +0000
commit68a57691dc5d712bff5c70691dd90c0c670022d0 (patch)
tree53bd7b9b59c9d1379b40355a4bdf1833b81d993b /gcc/fortran
parentdf54b9ab94b46279d2af4977d8bdd4187151a5a7 (diff)
downloadgcc-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/fortran')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/gfortranspec.c2
-rw-r--r--gcc/fortran/options.c2
-rw-r--r--gcc/fortran/parse.c2
-rw-r--r--gcc/fortran/st.c2
5 files changed, 11 insertions, 4 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 77697a7..d9a7580 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * 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.
+
2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/32933
diff --git a/gcc/fortran/gfortranspec.c b/gcc/fortran/gfortranspec.c
index 265f8d6..ca5da29 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 **) argv;
+ g77_newargv = (const char **) CONST_CAST (argv);
/* First pass through arglist.
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 99bb719..ad639ee 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -239,7 +239,7 @@ gfc_post_options (const char **pfilename)
gfc_add_include_path (".", true);
if (canon_source_file != gfc_source_file)
- gfc_free ((void *) canon_source_file);
+ gfc_free (CONST_CAST (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 10476f6..4e7e8e1 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -2625,7 +2625,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 ((char *) new_st.ext.omp_name);
+ gfc_free (CONST_CAST (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 0717615..8084453 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 ((char *) p->ext.omp_name);
+ gfc_free (CONST_CAST (p->ext.omp_name));
break;
case EXEC_OMP_FLUSH: