Warning fixes:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sat, 27 Mar 1999 10:24:06 +0000 (10:24 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sat, 27 Mar 1999 10:24:06 +0000 (10:24 +0000)
        * bad.c (_ffebad_message_, ffebad_string_, ffebad_message_,
        ffebad_bufputs_, ffebad_bufputs_, ffebad_start_, ffebad_string,
        ffebad_finish): Const-ify a char*.
        * bld.c (ffebld_op_string_, ffebld_op_string): Likewise.
        * bld.h (ffebld_op_string): Likewise.
        * com.c (ffecom_arglist_expr_, ffecom_build_f2c_string_,
        ffecom_debug_kludge_, ffecom_f2c_make_type_,
        ffecom_get_appended_identifier_, ffecom_get_identifier_,
        ffecom_gfrt_args_): Likewise.
        (ffecom_convert_narrow_, ffecom_convert_widen_): Add prototype.
        (builtin_function, ffecom_gfrt_name_, ffecom_gfrt_argstring_,
        ffecom_arglist_expr_, ffecom_build_f2c_string_,
        ffecom_debug_kludge_, ffecom_f2c_make_type_,
        ffecom_get_appended_identifier_, ffecom_get_external_identifier_,
        ffecom_get_identifier_, ffecom_decl_field,
        ffecom_get_invented_identifier, lang_print_error_function,
        skip_redundant_dir_prefix, read_name_map, print_containing_files):
        Const-ify a char*.
        (savestring): Remove, use `xstrdup' instead.
        * com.h (ffecom_decl_field, ffecom_get_invented_identifier):
        Const-ify a char*.
        * data.c (ffebld, ffedata_gather_): Make explicitly static.
        * expr.c (ffeexpr_isdigits_, ffeexpr_percent_,
        ffeexpr_reduced_concatenate_, ffeexpr_nil_real_,
        ffeexpr_nil_number_, ffeexpr_nil_number_period_,
        ffeexpr_nil_number_real_, ffeexpr_token_real_,
        ffeexpr_token_number_, ffeexpr_token_number_period_,
        ffeexpr_token_number_real_): Const-ify a char*.
        * fini.c (xspaces): Likewise.
        * global.c (ffeglobal_type_string_): Likewise.
        (ffeglobal_drive): Protoize.
        (ffeglobal_proc_def_arg): Const-ify a char*.
        * global.h (ffeglobal_drive): Protoize.
        (ffeglobal_proc_def_arg): Const-ify a char*.
        * implic.c (ffeimplic_none, ffeimplic_peek_symbol_type):
        Likewise.
        * implic.h (ffeimplic_peek_symbol_type): Likewise.
        * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_,
        ffeinfo_kind_string_, ffeinfo_kindtype_string_,
        ffeinfo_where_string_, ffeinfo_basictype_string,
        ffeinfo_kind_message, ffeinfo_kind_string,
        ffeinfo_kindtype_string, ffeinfo_where_string): Likewise.
        * info.h (ffeinfo_basictype_string, ffeinfo_kind_message,
        ffeinfo_kind_string, ffeinfo_kindtype_string,
        ffeinfo_where_string): Likewise.
        * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
        _ffeintrin_imp_, ffeintrin_check_, ffeintrin_cmp_name_,
        ffeintrin_fulfill_specific, ffeintrin_init_0,
        ffeintrin_is_actualarg, ffeintrin_is_intrinsic,
        ffeintrin_name_generic, ffeintrin_name_implementation,
        ffeintrin_name_specific): Likewise.
        * intrin.h (ffeintrin_is_intrinsic, ffeintrin_name_generic,
        ffeintrin_name_implementation, ffeintrin_name_specific): Likewise.
        * lex.c (ffelex_type_string_, ffelex_token_new_character,
        ffelex_token_new_name, ffelex_token_new_names,
        ffelex_token_new_number): Likewise.
        * lex.h (ffelex_token_new_character, ffelex_token_new_name,
        ffelex_token_new_names, ffelex_token_new_number): Likewise.
        * malloc.c (malloc_types_, malloc_pool_new, malloc_new_inpool_,
        malloc_new_zinpool_): Likewise.
        * malloc.h (malloc_new_inpool_, malloc_new_zinpool_,
        malloc_pool_new): Likewise.
        * name.c (ffename_space_drive_global, ffename_space_drive_symbol):
        Protoize.
        * name.h (ffename_space_drive_global, ffename_space_drive_symbol):
        Likewise.
        * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_,
        ffesymbol_attrs_string): Const-ify a char*.
        (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
        (ffesymbol_state_string): Const-ify a char*.
        * symbol.h (ffesymbol_attrs_string): Likewise.
        (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
        (ffesymbol_state_string): Const-ify a char*.
        * target.c (ffetarget_layout): Likewise.
        * target.h (ffetarget_layout): Likewise.

From-SVN: r26013

28 files changed:
gcc/f/ChangeLog
gcc/f/bad.c
gcc/f/bad.h
gcc/f/bld.c
gcc/f/bld.h
gcc/f/com.c
gcc/f/com.h
gcc/f/data.c
gcc/f/expr.c
gcc/f/fini.c
gcc/f/global.c
gcc/f/global.h
gcc/f/implic.c
gcc/f/implic.h
gcc/f/info.c
gcc/f/info.h
gcc/f/intrin.c
gcc/f/intrin.h
gcc/f/lex.c
gcc/f/lex.h
gcc/f/malloc.c
gcc/f/malloc.h
gcc/f/name.c
gcc/f/name.h
gcc/f/symbol.c
gcc/f/symbol.h
gcc/f/target.c
gcc/f/target.h

index 0137b91de6bc670eb1b51ea140c28c5629462371..6b3f09fb96aa1aeceef131f7ce4fd29ff59c5cca 100644 (file)
@@ -1,3 +1,106 @@
+Sat Mar 27 13:00:43 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * bad.c (_ffebad_message_, ffebad_string_, ffebad_message_,
+       ffebad_bufputs_, ffebad_bufputs_, ffebad_start_, ffebad_string,
+       ffebad_finish): Const-ify a char*.
+
+       * bld.c (ffebld_op_string_, ffebld_op_string): Likewise.
+
+       * bld.h (ffebld_op_string): Likewise.
+
+       * com.c (ffecom_arglist_expr_, ffecom_build_f2c_string_,
+       ffecom_debug_kludge_, ffecom_f2c_make_type_,
+       ffecom_get_appended_identifier_, ffecom_get_identifier_,
+       ffecom_gfrt_args_): Likewise.
+       (ffecom_convert_narrow_, ffecom_convert_widen_): Add prototype.
+       (builtin_function, ffecom_gfrt_name_, ffecom_gfrt_argstring_,
+       ffecom_arglist_expr_, ffecom_build_f2c_string_,
+       ffecom_debug_kludge_, ffecom_f2c_make_type_,
+       ffecom_get_appended_identifier_, ffecom_get_external_identifier_,
+       ffecom_get_identifier_, ffecom_decl_field,
+       ffecom_get_invented_identifier, lang_print_error_function,
+       skip_redundant_dir_prefix, read_name_map, print_containing_files):
+       Const-ify a char*. 
+       (savestring): Remove, use `xstrdup' instead.
+
+       * com.h (ffecom_decl_field, ffecom_get_invented_identifier):
+       Const-ify a char*.
+
+       * data.c (ffebld, ffedata_gather_): Make explicitly static.
+
+       * expr.c (ffeexpr_isdigits_, ffeexpr_percent_,
+       ffeexpr_reduced_concatenate_, ffeexpr_nil_real_,
+       ffeexpr_nil_number_, ffeexpr_nil_number_period_,
+       ffeexpr_nil_number_real_, ffeexpr_token_real_,
+       ffeexpr_token_number_, ffeexpr_token_number_period_,
+       ffeexpr_token_number_real_): Const-ify a char*.
+
+       * fini.c (xspaces): Likewise.
+
+       * global.c (ffeglobal_type_string_): Likewise.
+       (ffeglobal_drive): Protoize.
+       (ffeglobal_proc_def_arg): Const-ify a char*.
+
+       * global.h (ffeglobal_drive): Protoize.
+       (ffeglobal_proc_def_arg): Const-ify a char*.
+
+       * implic.c (ffeimplic_none, ffeimplic_peek_symbol_type):
+       Likewise.
+
+       * implic.h (ffeimplic_peek_symbol_type): Likewise.
+
+       * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_,
+       ffeinfo_kind_string_, ffeinfo_kindtype_string_,
+       ffeinfo_where_string_, ffeinfo_basictype_string,
+       ffeinfo_kind_message, ffeinfo_kind_string,
+       ffeinfo_kindtype_string, ffeinfo_where_string): Likewise.
+
+       * info.h (ffeinfo_basictype_string, ffeinfo_kind_message,
+       ffeinfo_kind_string, ffeinfo_kindtype_string,
+       ffeinfo_where_string): Likewise.
+
+       * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
+       _ffeintrin_imp_, ffeintrin_check_, ffeintrin_cmp_name_,
+       ffeintrin_fulfill_specific, ffeintrin_init_0,
+       ffeintrin_is_actualarg, ffeintrin_is_intrinsic,
+       ffeintrin_name_generic, ffeintrin_name_implementation,
+       ffeintrin_name_specific): Likewise.
+
+       * intrin.h (ffeintrin_is_intrinsic, ffeintrin_name_generic,
+       ffeintrin_name_implementation, ffeintrin_name_specific): Likewise.
+
+       * lex.c (ffelex_type_string_, ffelex_token_new_character,
+       ffelex_token_new_name, ffelex_token_new_names,
+       ffelex_token_new_number): Likewise.
+
+       * lex.h (ffelex_token_new_character, ffelex_token_new_name,
+       ffelex_token_new_names, ffelex_token_new_number): Likewise.
+
+       * malloc.c (malloc_types_, malloc_pool_new, malloc_new_inpool_,
+       malloc_new_zinpool_): Likewise.
+
+       * malloc.h (malloc_new_inpool_, malloc_new_zinpool_,
+       malloc_pool_new): Likewise.
+
+       * name.c (ffename_space_drive_global, ffename_space_drive_symbol):
+       Protoize.
+
+       * name.h (ffename_space_drive_global, ffename_space_drive_symbol):
+       Likewise.
+
+       * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_,
+       ffesymbol_attrs_string): Const-ify a char*.
+       (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
+       (ffesymbol_state_string): Const-ify a char*.
+
+       * symbol.h (ffesymbol_attrs_string): Likewise.
+       (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
+       (ffesymbol_state_string): Const-ify a char*.
+
+       * target.c (ffetarget_layout): Likewise.
+
+       * target.h (ffetarget_layout): Likewise.
+
 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
 
        * Make-lang.in: Remove all references to g77.o/g77.c.
index 63311d59b77f6080b3f8ecaa4518c2afa1b2951d..704fa1243eac57560e09ecc28c2f8b826f1a7b52 100644 (file)
@@ -62,7 +62,7 @@ bool ffebad_is_inhibited_ = FALSE;
 struct _ffebad_message_
   {
     ffebadSeverity severity;
-    char *message;
+    const char *message;
   };
 
 /* Static objects accessed by functions in this module.         */
@@ -89,11 +89,11 @@ static struct
   }
 
 ffebad_here_[FFEBAD_MAX_];
-static char *ffebad_string_[FFEBAD_MAX_];
+static const char *ffebad_string_[FFEBAD_MAX_];
 static ffebadIndex ffebad_order_[FFEBAD_MAX_];
 static ffebad ffebad_errnum_;
 static ffebadSeverity ffebad_severity_;
-static char *ffebad_message_;
+static const char *ffebad_message_;
 static unsigned char ffebad_index_;
 static ffebadIndex ffebad_places_;
 static bool ffebad_is_temp_inhibited_; /* Effective setting of
@@ -102,7 +102,7 @@ static bool ffebad_is_temp_inhibited_;      /* Effective setting of
 
 /* Static functions (internal). */
 
-static int ffebad_bufputs_ (char buf[], int bufi, char *s);
+static int ffebad_bufputs_ (char buf[], int bufi, const char *s);
 
 /* Internal macros. */
 
@@ -115,7 +115,7 @@ static int ffebad_bufputs_ (char buf[], int bufi, char *s);
 \f
 
 static int
-ffebad_bufputs_ (char buf[], int bufi, char *s)
+ffebad_bufputs_ (char buf[], int bufi, const char *s)
 {
   for (; *s != '\0'; ++s)
     bufi = ffebad_bufputc_ (buf, bufi, *s);
@@ -161,7 +161,7 @@ ffebad_severity (ffebad errnum)
 
 bool
 ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev,
-              char *message)
+              const char *message)
 {
   unsigned char i;
 
@@ -321,7 +321,7 @@ ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col)
 
 /* Establish string for next index (always in order) of message
 
-   ffebad_string(char *string);
+   ffebad_string(const char *string);
 
    Call ffebad_start to establish the message, ffebad_here and ffebad_string
    to send run-time data to it as necessary, then ffebad_finish when through
@@ -330,7 +330,7 @@ ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col)
    the argument passed in until then.  */
 
 void
-ffebad_string (char *string)
+ffebad_string (const char *string)
 {
   if (ffebad_is_temp_inhibited_)
     return;
@@ -351,7 +351,7 @@ void
 ffebad_finish ()
 {
 #define MAX_SPACES 132
-  static char *spaces
+  static const char *spaces
   = "...>\
 \040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\
 \040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\
@@ -373,8 +373,8 @@ ffebad_finish ()
   unsigned short i;
   char pointer;
   unsigned char c;
-  unsigned char *s;
-  char *fn;
+  unsigned const char *s;
+  const char *fn;
   static char buf[1024];
   int bufi;
   int index;
index 5a9afbaa2d80b6573fc8921c3e85ed5d6f10c196..734022370cd172069ef135f527b42503fbd2fe1d 100644 (file)
@@ -82,8 +82,8 @@ void ffebad_init_0 (void);
 bool ffebad_is_fatal (ffebad errnum);
 ffebadSeverity ffebad_severity (ffebad errnum);
 bool ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev,
-                   char *message);
-void ffebad_string (char *string);
+                   const char *message);
+void ffebad_string (const char *string);
 
 /* Define macros. */
 
index c35af2db30f80fcd9b188f6057f37e1a3f10bac1..6ef559e077a8d43356c356c6be4d8ac121cb2f74 100644 (file)
@@ -203,7 +203,7 @@ static ffebldConstant ffebld_constant_hollerith_;
 static ffebldConstant ffebld_constant_typeless_[FFEBLD_constTYPELESS_LAST
                                          - FFEBLD_constTYPELESS_FIRST + 1];
 
-static char *ffebld_op_string_[]
+static const char *ffebld_op_string_[]
 =
 {
 #define FFEBLD_OP(KWD,NAME,ARITY) NAME,
@@ -5745,7 +5745,7 @@ ffebld_pool_push (mallocPool pool)
 
    Returns a short string (uppercase) containing the name of the op.  */
 
-char *
+const char *
 ffebld_op_string (ffebldOp o)
 {
   if (o >= ARRAY_SIZE (ffebld_op_string_))
index 1950f90ef96c81c4eb4718623a6057e8014e1191..96c8e5e05ef9aac11d0d696441d5c200e2328569 100644 (file)
@@ -726,7 +726,7 @@ ffebld ffebld_new_symter (ffesymbol s, ffeintrinGen gen, ffeintrinSpec spec,
                          ffeintrinImp imp);
 ffebld ffebld_new_one (ffebldOp o, ffebld left);
 ffebld ffebld_new_two (ffebldOp o, ffebld left, ffebld right);
-char *ffebld_op_string (ffebldOp o);
+const char *ffebld_op_string (ffebldOp o);
 void ffebld_pool_pop (void);
 void ffebld_pool_push (mallocPool pool);
 ffetargetCharacterSize ffebld_size_max (ffebld b);
index 3b1b7b14dc3d15af6446f7f97717d8afc7ab6408..2c03fae27101c1c1c36fed2f234409b1f40e8069 100644 (file)
@@ -403,7 +403,7 @@ struct _ffecom_temp_
 /* Static functions (internal). */
 
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
-static tree ffecom_arglist_expr_ (char *argstring, ffebld args);
+static tree ffecom_arglist_expr_ (const char *argstring, ffebld args);
 static tree ffecom_widest_expr_type_ (ffebld list);
 static bool ffecom_overlap_ (tree dest_decl, tree dest_offset,
                             tree dest_size, tree source_tree,
@@ -411,7 +411,7 @@ static bool ffecom_overlap_ (tree dest_decl, tree dest_offset,
 static bool ffecom_args_overlapping_ (tree dest_tree, ffebld dest,
                                      tree args, tree callee_commons,
                                      bool scalar_args);
-static tree ffecom_build_f2c_string_ (int i, char *s);
+static tree ffecom_build_f2c_string_ (int i, const char *s);
 static tree ffecom_call_ (tree fn, ffeinfoKindtype kt,
                          bool is_f2c_complex, tree type,
                          tree args, tree dest_tree,
@@ -434,8 +434,9 @@ static ffecomConcatList_
 static void ffecom_concat_list_kill_ (ffecomConcatList_ catlist);
 static ffecomConcatList_ ffecom_concat_list_new_ (ffebld expr,
                                                ffetargetCharacterSize max);
-static void ffecom_debug_kludge_ (tree aggr, char *aggr_type, ffesymbol member,
-                                 tree member_type, ffetargetOffset offset);
+static void ffecom_debug_kludge_ (tree aggr, const char *aggr_type,
+                                 ffesymbol member, tree member_type,
+                                 ffetargetOffset offset);
 static void ffecom_do_entry_ (ffesymbol fn, int entrynum);
 static tree ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
                          bool *dest_used, bool assignp, bool widenp);
@@ -443,18 +444,18 @@ static tree ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
                                    ffebld dest, bool *dest_used);
 static tree ffecom_expr_power_integer_ (ffebld left, ffebld right);
 static void ffecom_expr_transform_ (ffebld expr);
-static void ffecom_f2c_make_type_ (tree *type, int tcode, char *name);
+static void ffecom_f2c_make_type_ (tree *type, int tcode, const char *name);
 static void ffecom_f2c_set_lio_code_ (ffeinfoBasictype bt, int size,
                                      int code);
 static ffeglobal ffecom_finish_global_ (ffeglobal global);
 static ffesymbol ffecom_finish_symbol_transform_ (ffesymbol s);
-static tree ffecom_get_appended_identifier_ (char us, char *text);
+static tree ffecom_get_appended_identifier_ (char us, const char *text);
 static tree ffecom_get_external_identifier_ (ffesymbol s);
-static tree ffecom_get_identifier_ (char *text);
+static tree ffecom_get_identifier_ (const char *text);
 static tree ffecom_gen_sfuncdef_ (ffesymbol s,
                                  ffeinfoBasictype bt,
                                  ffeinfoKindtype kt);
-static char *ffecom_gfrt_args_ (ffecomGfrt ix);
+static const char *ffecom_gfrt_args_ (ffecomGfrt ix);
 static tree ffecom_gfrt_tree_ (ffecomGfrt ix);
 static tree ffecom_init_zero_ (tree decl);
 static tree ffecom_intrinsic_ichar_ (tree tree_type, ffebld arg,
@@ -495,6 +496,8 @@ static tree ffecom_type_vardesc_ (void);
 static tree ffecom_vardesc_ (ffebld expr);
 static tree ffecom_vardesc_array_ (ffesymbol s);
 static tree ffecom_vardesc_dims_ (ffesymbol s);
+static tree ffecom_convert_narrow_ (tree type, tree expr);
+static tree ffecom_convert_widen_ (tree type, tree expr);
 #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
 
 /* These are static functions that parallel those found in the C front
@@ -503,9 +506,9 @@ static tree ffecom_vardesc_dims_ (ffesymbol s);
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
 static void bison_rule_compstmt_ (void);
 static void bison_rule_pushlevel_ (void);
-static tree builtin_function (char *name, tree type,
+static tree builtin_function (const char *name, tree type,
                              enum built_in_function function_code,
-                             char *library_name);
+                             const char *library_name);
 static int duplicate_decls (tree newdecl, tree olddecl);
 static void finish_decl (tree decl, tree init, bool is_top_level);
 static void finish_function (int nested);
@@ -577,7 +580,7 @@ static tree ffecom_gfrt_[FFECOM_gfrt]
 
 /* Holds the external names of the functions.  */
 
-static char *ffecom_gfrt_name_[FFECOM_gfrt]
+static const char *ffecom_gfrt_name_[FFECOM_gfrt]
 =
 {
 #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) NAME,
@@ -617,7 +620,7 @@ static ffecomRttype_ ffecom_gfrt_type_[FFECOM_gfrt]
 
 /* String of codes for the function's arguments.  */
 
-static char *ffecom_gfrt_argstring_[FFECOM_gfrt]
+static const char *ffecom_gfrt_argstring_[FFECOM_gfrt]
 =
 {
 #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) ARGS,
@@ -1097,7 +1100,7 @@ ffecom_build_complex_constant_ (tree type, tree realpart, tree imagpart)
 
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
 static tree
-ffecom_arglist_expr_ (char *c, ffebld expr)
+ffecom_arglist_expr_ (const char *c, ffebld expr)
 {
   tree list;
   tree *plist = &list;
@@ -1519,14 +1522,14 @@ ffecom_args_overlapping_ (tree dest_tree, ffebld dest UNUSED,
 
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
 static tree
-ffecom_build_f2c_string_ (int i, char *s)
+ffecom_build_f2c_string_ (int i, const char *s)
 {
   if (!ffe_is_f2c_library ())
     return build_string (i, s);
 
   {
     char *tmp;
-    char *p;
+    const char *p;
     char *q;
     char space[34];
     tree t;
@@ -2268,7 +2271,7 @@ ffecom_concat_list_new_ (ffebld expr, ffetargetCharacterSize max)
 
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
 static void
-ffecom_debug_kludge_ (tree aggr, char *aggr_type, ffesymbol member,
+ffecom_debug_kludge_ (tree aggr, const char *aggr_type, ffesymbol member,
                      tree member_type UNUSED, ffetargetOffset offset)
 {
   tree value;
@@ -6562,7 +6565,7 @@ tail_recurse:                     /* :::::::::::::::::::: */
 
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
 static void
-ffecom_f2c_make_type_ (tree *type, int tcode, char *name)
+ffecom_f2c_make_type_ (tree *type, int tcode, const char *name)
 {
   switch (tcode)
     {
@@ -6762,7 +6765,7 @@ ffecom_finish_symbol_transform_ (ffesymbol s)
 
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
 static tree
-ffecom_get_appended_identifier_ (char us, char *name)
+ffecom_get_appended_identifier_ (char us, const char *name)
 {
   int i;
   char *newname;
@@ -6791,7 +6794,7 @@ static tree
 ffecom_get_external_identifier_ (ffesymbol s)
 {
   char us;
-  char *name = ffesymbol_text (s);
+  const char *name = ffesymbol_text (s);
 
   /* If name is a built-in name, just return it as is.  */
 
@@ -6830,7 +6833,7 @@ ffecom_get_external_identifier_ (ffesymbol s)
 
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
 static tree
-ffecom_get_identifier_ (char *name)
+ffecom_get_identifier_ (const char *name)
 {
   /* If name does not contain an underscore, just return it as is.  */
 
@@ -6991,7 +6994,7 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt)
 #endif
 
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
-static char *
+static const char *
 ffecom_gfrt_args_ (ffecomGfrt ix)
 {
   return ffecom_gfrt_argstring_[ix];
@@ -11478,7 +11481,7 @@ ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
 tree
 ffecom_decl_field (tree context, tree prevfield,
-                  char *name, tree type)
+                  const char *name, tree type)
 {
   tree field;
 
@@ -11788,7 +11791,7 @@ ffecom_finish_progunit ()
 
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
 tree
-ffecom_get_invented_identifier (char *pattern, char *text, int number)
+ffecom_get_invented_identifier (const char *pattern, const char *text, int number)
 {
   tree decl;
   char *nam;
@@ -13813,8 +13816,9 @@ bison_rule_pushlevel_ ()
    the name to be called if we can't opencode the function.  */
 
 static tree
-builtin_function (char *name, tree type,
-                 enum built_in_function function_code, char *library_name)
+builtin_function (const char *name, tree type,
+                 enum built_in_function function_code,
+                 const char *library_name)
 {
   tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
   DECL_EXTERNAL (decl) = 1;
@@ -14418,7 +14422,7 @@ lang_print_error_function (file)
   static ffesymbol last_s = NULL;
   ffeglobal g;
   ffesymbol s;
-  char *kind;
+  const char *kind;
 
   if ((ffecom_primary_entry_ == NULL)
       || (ffesymbol_global (ffecom_primary_entry_) == NULL))
@@ -14472,7 +14476,7 @@ lang_print_error_function (file)
        fprintf (stderr, "Outside of any program unit:\n");
       else
        {
-         char *name = ffesymbol_text (s);
+         const char *name = ffesymbol_text (s);
 
          fprintf (stderr, "In %s `%s':\n", kind, name);
        }
@@ -15824,8 +15828,8 @@ unsigned_type (type)
 /* Skip leading "./" from a directory name.
    This may yield the empty string, which represents the current directory.  */
 
-static char *
-skip_redundant_dir_prefix (char *dir)
+static const char *
+skip_redundant_dir_prefix (const char *dir)
 {
   while (dir[0] == '.' && dir[1] == '/')
     for (dir += 2; *dir == '/'; dir++)
@@ -15923,10 +15927,9 @@ static void append_include_chain (struct file_name_list *first,
 static FILE *open_include_file (char *filename,
                                struct file_name_list *searchptr);
 static void print_containing_files (ffebadSeverity sev);
-static char *skip_redundant_dir_prefix (char *);
+static const char *skip_redundant_dir_prefix (const char *);
 static char *read_filename_string (int ch, FILE *f);
-static struct file_name_map *read_name_map (char *dirname);
-static char *savestring (char *input);
+static struct file_name_map *read_name_map (const char *dirname);
 
 /* Append a chain of `struct file_name_list's
    to the end of the main include chain.
@@ -16048,8 +16051,8 @@ print_containing_files (ffebadSeverity sev)
   FILE_BUF *ip = NULL;
   int i;
   int first = 1;
-  char *str1;
-  char *str2;
+  const char *str1;
+  const char *str2;
 
   /* If stack of files hasn't changed since we last printed
      this info, don't repeat it.  */
@@ -16134,7 +16137,7 @@ read_filename_string (ch, f)
 
 static struct file_name_map *
 read_name_map (dirname)
-     char *dirname;
+     const char *dirname;
 {
   /* This structure holds a linked list of file name maps, one per
      directory.  */
@@ -16160,7 +16163,7 @@ read_name_map (dirname)
 
   map_list_ptr = ((struct file_name_map_list *)
                  xmalloc (sizeof (struct file_name_map_list)));
-  map_list_ptr->map_list_name = savestring (dirname);
+  map_list_ptr->map_list_name = xstrdup (dirname);
   map_list_ptr->map_list_map = NULL;
 
   dirlen = strlen (dirname);
@@ -16221,16 +16224,6 @@ read_name_map (dirname)
   return map_list_ptr->map_list_map;
 }
 
-static char *
-savestring (input)
-     char *input;
-{
-  unsigned size = strlen (input);
-  char *output = xmalloc (size + 1);
-  strcpy (output, input);
-  return output;
-}
-
 static void
 ffecom_file_ (char *name)
 {
index 2d1b70a0e558c453bc0253da9e1c20b3b76949a5..a438d0bdc86a7d136d51b48072d5794f9ed497b6 100644 (file)
@@ -283,7 +283,7 @@ tree ffecom_arg_ptr_to_expr (ffebld expr, tree *length);
 tree ffecom_call_gfrt (ffecomGfrt ix, tree args);
 tree ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
                           ffeinfoKindtype kt, tree tree_type);
-tree ffecom_decl_field (tree context, tree prevfield, char *name,
+tree ffecom_decl_field (tree context, tree prevfield, const char *name,
                        tree type);
 #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
 void ffecom_close_include (FILE *f);
@@ -299,7 +299,7 @@ tree ffecom_expr_rw (ffebld expr);
 void ffecom_finish_compile (void);
 void ffecom_finish_decl (tree decl, tree init, bool is_top_level);
 void ffecom_finish_progunit (void);
-tree ffecom_get_invented_identifier (char *pattern, char *text,
+tree ffecom_get_invented_identifier (const char *pattern, const char *text,
                                     int number);
 ffeinfoKindtype ffecom_gfrt_basictype (ffecomGfrt ix);
 ffeinfoKindtype ffecom_gfrt_kindtype (ffecomGfrt ix);
index 216517f04bf83d044963dda2146f3875a44043c7..51eb2b7661b6ee5f71c547b11dca04f75c906dc4 100644 (file)
@@ -668,7 +668,7 @@ tail_recurse:                       /* :::::::::::::::::::: */
    expression doesn't already exist in the cache) and then puts the result
    in the cache.  */
 
-ffebld
+static ffebld
 ffedata_convert_ (ffebld source, ffelexToken source_token,
                  ffelexToken dest_token, ffeinfoBasictype bt,
                  ffeinfoKindtype kt, ffeinfoRank rk,
@@ -1119,7 +1119,7 @@ ffedata_eval_substr_end_ (ffebld expr, ffetargetCharacterSize min,
    If st has any initialization info, transfer that info into mst and
    clear st's info.  */
 
-void
+static void
 ffedata_gather_ (ffestorag mst, ffestorag st)
 {
   ffesymbol s;
index 5dd8d71748d9258d7e06f20e4e3d0226444b9e25..72a6264dbf4b223b4629bd642f22dae6424680b7 100644 (file)
@@ -268,7 +268,7 @@ static void ffeexpr_update_impdo_sym_ (ffebld expr, ffesymbol dovar);
 static ffeexprContext ffeexpr_context_outer_ (ffeexprStack_ s);
 static ffeexprExpr_ ffeexpr_expr_new_ (void);
 static void ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t);
-static bool ffeexpr_isdigits_ (char *p);
+static bool ffeexpr_isdigits_ (const char *p);
 static ffelexHandler ffeexpr_token_first_lhs_ (ffelexToken t);
 static ffelexHandler ffeexpr_token_first_lhs_1_ (ffelexToken t);
 static ffelexHandler ffeexpr_token_first_rhs_ (ffelexToken t);
@@ -8584,7 +8584,7 @@ ffeexpr_context_outer_ (ffeexprStack_ s)
 static ffeexprPercent_
 ffeexpr_percent_ (ffelexToken t)
 {
-  char *p;
+  const char *p;
 
   switch (ffelex_token_length (t))
     {
@@ -9537,7 +9537,7 @@ ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t)
 /* Check whether rest of string is all decimal digits.  */
 
 static bool
-ffeexpr_isdigits_ (char *p)
+ffeexpr_isdigits_ (const char *p)
 {
   for (; *p != '\0'; ++p)
     if (! ISDIGIT (*p))
@@ -10378,7 +10378,7 @@ ffeexpr_reduced_concatenate_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op,
       if ((lkd != FFEINFO_kindANY)
          && ffebad_start (FFEBAD_CONCAT_ARG_KIND))
        {
-         char *what;
+         const char *what;
 
          if (lrk != 0)
            what = "an array";
@@ -10394,7 +10394,7 @@ ffeexpr_reduced_concatenate_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op,
     {
       if (ffebad_start (FFEBAD_CONCAT_ARG_KIND))
        {
-         char *what;
+         const char *what;
 
          if (rrk != 0)
            what = "an array";
@@ -11666,7 +11666,7 @@ static ffelexHandler
 ffeexpr_nil_real_ (ffelexToken t)
 {
   char d;
-  char *p;
+  const char *p;
 
   if (((ffelex_token_type (t) != FFELEX_typeNAME)
        && (ffelex_token_type (t) != FFELEX_typeNAMES))
@@ -11704,7 +11704,7 @@ static ffelexHandler
 ffeexpr_nil_number_ (ffelexToken t)
 {
   char d;
-  char *p;
+  const char *p;
 
   if (ffeexpr_hollerith_count_ > 0)
     ffelex_set_expecting_hollerith (0, '\0',
@@ -11779,7 +11779,7 @@ ffeexpr_nil_number_period_ (ffelexToken t)
 {
   ffelexHandler nexthandler;
   char d;
-  char *p;
+  const char *p;
 
   switch (ffelex_token_type (t))
     {
@@ -11836,7 +11836,7 @@ static ffelexHandler
 ffeexpr_nil_number_real_ (ffelexToken t)
 {
   char d;
-  char *p;
+  const char *p;
 
   if (((ffelex_token_type (t) != FFELEX_typeNAME)
        && (ffelex_token_type (t) != FFELEX_typeNAMES))
@@ -13652,7 +13652,7 @@ static ffelexHandler
 ffeexpr_token_real_ (ffelexToken t)
 {
   char d;
-  char *p;
+  const char *p;
 
   if (((ffelex_token_type (t) != FFELEX_typeNAME)
        && (ffelex_token_type (t) != FFELEX_typeNAMES))
@@ -13809,7 +13809,7 @@ ffeexpr_token_number_ (ffelexToken t)
   ffeexprExpr_ e;
   ffeinfo ni;
   char d;
-  char *p;
+  const char *p;
 
   if (ffeexpr_hollerith_count_ > 0)
     ffelex_set_expecting_hollerith (0, '\0',
@@ -13965,7 +13965,7 @@ ffeexpr_token_number_period_ (ffelexToken t)
 {
   ffeexprExpr_ e;
   ffelexHandler nexthandler;
-  char *p;
+  const char *p;
   char d;
 
   switch (ffelex_token_type (t))
@@ -14083,7 +14083,7 @@ static ffelexHandler
 ffeexpr_token_number_real_ (ffelexToken t)
 {
   char d;
-  char *p;
+  const char *p;
 
   if (((ffelex_token_type (t) != FFELEX_typeNAME)
        && (ffelex_token_type (t) != FFELEX_typeNAMES))
index 1c54997c1f901f8bdf3d784cdb88244ec1ec6dca..1b7c98194095ed71c96ccd48c7ea613841818d2f 100644 (file)
@@ -62,7 +62,7 @@ static FILE *out;
 static char prefix[32];
 static char postfix[32];
 static char storage[32];
-static char *xspaces[]
+static const char *xspaces[]
 =
 {
   "",                          /* 0 */
index 3f7769ade9965692cf9bb1705a32c1b64c1ea8b3..85311f1860178df6c820e05fbe7f764ffefc1770 100644 (file)
@@ -60,7 +60,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #if FFEGLOBAL_ENABLED
 static ffenameSpace ffeglobal_filewide_ = NULL;
-static char *ffeglobal_type_string_[] =
+static const char *ffeglobal_type_string_[] =
 {
   [FFEGLOBAL_typeNONE] "??",
   [FFEGLOBAL_typeMAIN] "main program",
@@ -86,7 +86,7 @@ static char *ffeglobal_type_string_[] =
 
 #if FFEGLOBAL_ENABLED
 void
-ffeglobal_drive (ffeglobal (*fn) ())
+ffeglobal_drive (ffeglobal (*fn) (ffeglobal))
 {
   if (ffeglobal_filewide_ != NULL)
     ffename_space_drive_global (ffeglobal_filewide_, fn);
@@ -514,7 +514,7 @@ ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl,
 /* Collect info for a global's argument.  */
 
 void
-ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary as,
+ffeglobal_proc_def_arg (ffesymbol s, int argno, const char *name, ffeglobalArgSummary as,
                        ffeinfoBasictype bt, ffeinfoKindtype kt,
                        bool array)
 {
@@ -538,8 +538,8 @@ ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary
   if ((ai->t != NULL)
       && ffe_is_warn_globals ())
     {
-      char *refwhy = NULL;
-      char *defwhy = NULL;
+      const char *refwhy = NULL;
+      const char *defwhy = NULL;
       bool warn = FALSE;
 
       switch (as)
@@ -816,8 +816,8 @@ ffeglobal_proc_ref_arg (ffesymbol s, int argno, ffeglobalArgSummary as,
 
   if (ai->t != NULL)
     {
-      char *refwhy = NULL;
-      char *defwhy = NULL;
+      const char *refwhy = NULL;
+      const char *defwhy = NULL;
       bool fail = FALSE;
       bool warn = FALSE;
 
index 996646aae5314fe868e601adf61f438722d83118..eaf99214b8c4597451bc319814b527a279311041 100644 (file)
@@ -128,14 +128,14 @@ struct _ffeglobal_
 
 /* Declare functions with prototypes. */
 
-void ffeglobal_drive (ffeglobal (*fn) ());
+void ffeglobal_drive (ffeglobal (*fn) (ffeglobal));
 void ffeglobal_init_1 (void);
 void ffeglobal_init_common (ffesymbol s, ffelexToken t);
 void ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type);
 void ffeglobal_new_common (ffesymbol s, ffelexToken t, bool blank);
 void ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl,
                           ffewhereColumn wc);
-void ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary as,
+void ffeglobal_proc_def_arg (ffesymbol s, int argno, const char *name, ffeglobalArgSummary as,
                             ffeinfoBasictype bt, ffeinfoKindtype kt,
                             bool array);
 void ffeglobal_proc_def_nargs (ffesymbol s, int n_args);
index 3ff27fd22964efafaa66efc5eae0ee6c1f2e00f4..7e0c61b1605e3fcbe602e06fc1a8e904e8d1d485 100644 (file)
@@ -331,7 +331,7 @@ ffeimplic_none ()
 /* ffeimplic_peek_symbol_type -- Determine implicit type of a symbol
 
    ffesymbol s;
-   char *name; // name for s in case it is NULL, or NULL if s never NULL
+   const char *name; // name for s in case it is NULL, or NULL if s never NULL
    if (ffeimplic_peek_symbol_type(s,name) == FFEINFO_basictypeCHARACTER)
        // is or will be a CHARACTER-typed name
 
@@ -348,7 +348,7 @@ ffeimplic_none ()
       needed anyway (as when ffecom calls it). */
 
 ffeinfoBasictype
-ffeimplic_peek_symbol_type (ffesymbol s, char *name)
+ffeimplic_peek_symbol_type (ffesymbol s, const char *name)
 {
   char c;
   ffeimplic_ imp;
index b79a419ecfca1ad5c1947bb1f6f66a00c7f96fa0..ae9665384918667b684cd4d7e5600d29144671da 100644 (file)
@@ -55,7 +55,7 @@ bool ffeimplic_establish_initial (char c, ffeinfoBasictype basic_type,
 bool ffeimplic_establish_symbol (ffesymbol s);
 void ffeimplic_init_2 (void);
 void ffeimplic_none (void);
-ffeinfoBasictype ffeimplic_peek_symbol_type (ffesymbol s, char *name);
+ffeinfoBasictype ffeimplic_peek_symbol_type (ffesymbol s, const char *name);
 void ffeimplic_terminate_2 (void);
 
 /* Define macros. */
index def0575c96b0a1ec1c8bbd1f5ec6d746b0ceaf9e..784e699e08cb3133226257a2f9172cd23cb08208 100644 (file)
@@ -55,21 +55,21 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 /* Static objects accessed by functions in this module.         */
 
-static char *ffeinfo_basictype_string_[]
+static const char *ffeinfo_basictype_string_[]
 =
 {
 #define FFEINFO_BASICTYPE(KWD,LNAM,SNAM) SNAM,
 #include "info-b.def"
 #undef FFEINFO_BASICTYPE
 };
-static char *ffeinfo_kind_message_[]
+static const char *ffeinfo_kind_message_[]
 =
 {
 #define FFEINFO_KIND(KWD,LNAM,SNAM) LNAM,
 #include "info-k.def"
 #undef FFEINFO_KIND
 };
-static char *ffeinfo_kind_string_[]
+static const char *ffeinfo_kind_string_[]
 =
 {
 #define FFEINFO_KIND(KWD,LNAM,SNAM) SNAM,
@@ -77,7 +77,7 @@ static char *ffeinfo_kind_string_[]
 #undef FFEINFO_KIND
 };
 static ffeinfoBasictype ffeinfo_combine_[FFEINFO_basictype][FFEINFO_basictype];
-static char *ffeinfo_kindtype_string_[]
+static const char *ffeinfo_kindtype_string_[]
 =
 {
   "",
@@ -91,7 +91,7 @@ static char *ffeinfo_kindtype_string_[]
   "8",
   "*",
 };
-static char *ffeinfo_where_string_[]
+static const char *ffeinfo_where_string_[]
 =
 {
 #define FFEINFO_WHERE(KWD,LNAM,SNAM) SNAM,
@@ -129,7 +129,7 @@ ffeinfo_basictype_combine (ffeinfoBasictype l, ffeinfoBasictype r)
 
    Returns the string based on the basic type. */
 
-char *
+const char *
 ffeinfo_basictype_string (ffeinfoBasictype basictype)
 {
   if (basictype >= ARRAY_SIZE (ffeinfo_basictype_string_))
@@ -186,7 +186,7 @@ ffeinfo_init_0 ()
 
    Returns the string based on the kind.  */
 
-char *
+const char *
 ffeinfo_kind_message (ffeinfoKind kind)
 {
   if (kind >= ARRAY_SIZE (ffeinfo_kind_message_))
@@ -201,7 +201,7 @@ ffeinfo_kind_message (ffeinfoKind kind)
 
    Returns the string based on the kind.  */
 
-char *
+const char *
 ffeinfo_kind_string (ffeinfoKind kind)
 {
   if (kind >= ARRAY_SIZE (ffeinfo_kind_string_))
@@ -232,7 +232,7 @@ ffeinfo_kindtype_max(ffeinfoBasictype bt,
 
    Returns the string based on the kind type.  */
 
-char *
+const char *
 ffeinfo_kindtype_string (ffeinfoKindtype kind_type)
 {
   if (kind_type >= ARRAY_SIZE (ffeinfo_kindtype_string_))
@@ -267,7 +267,7 @@ ffeinfo_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype)
 
    Returns the string based on the where.  */
 
-char *
+const char *
 ffeinfo_where_string (ffeinfoWhere where)
 {
   if (where >= ARRAY_SIZE (ffeinfo_where_string_))
index af38661f9420a713e836ef5798ceb2301b33657f..bbf4e94930dddd445688d094d3915225137068ee 100644 (file)
@@ -127,15 +127,15 @@ struct _ffeinfo_
 
 ffeinfoBasictype ffeinfo_basictype_combine (ffeinfoBasictype l,
                                            ffeinfoBasictype r);
-char *ffeinfo_basictype_string (ffeinfoBasictype basictype);
+const char *ffeinfo_basictype_string (ffeinfoBasictype basictype);
 void ffeinfo_init_0 (void);
-char *ffeinfo_kind_message (ffeinfoKind kind);
-char *ffeinfo_kind_string (ffeinfoKind kind);
+const char *ffeinfo_kind_message (ffeinfoKind kind);
+const char *ffeinfo_kind_string (ffeinfoKind kind);
 ffeinfoKindtype ffeinfo_kindtype_max(ffeinfoBasictype bt,
                                     ffeinfoKindtype k1,
                                     ffeinfoKindtype k2);
-char *ffeinfo_kindtype_string (ffeinfoKindtype kind_type);
-char *ffeinfo_where_string (ffeinfoWhere where);
+const char *ffeinfo_kindtype_string (ffeinfoKindtype kind_type);
+const char *ffeinfo_where_string (ffeinfoWhere where);
 ffeinfo ffeinfo_new (ffeinfoBasictype basictype, ffeinfoKindtype kindtype,
                     ffeinfoRank rank, ffeinfoKind kind, ffeinfoWhere where,
                     ffetargetCharacterSize size);
index 6760be4867607288cac9e95b7b614ed0be431d78..dbf375b849f9fa003b2c92f2f7a435972a07dd8d 100644 (file)
@@ -32,22 +32,22 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 struct _ffeintrin_name_
   {
-    char *name_uc;
-    char *name_lc;
-    char *name_ic;
+    const char *name_uc;
+    const char *name_lc;
+    const char *name_ic;
     ffeintrinGen generic;
     ffeintrinSpec specific;
   };
 
 struct _ffeintrin_gen_
   {
-    char *name;                        /* Name as seen in program. */
+    const char *name;                  /* Name as seen in program. */
     ffeintrinSpec specs[2];
   };
 
 struct _ffeintrin_spec_
   {
-    char *name;                        /* Uppercase name as seen in source code,
+    const char *name;          /* Uppercase name as seen in source code,
                                   lowercase if no source name, "none" if no
                                   name at all (NONE case). */
     bool is_actualarg;         /* Ok to pass as actual arg if -pedantic. */
@@ -57,13 +57,13 @@ struct _ffeintrin_spec_
 
 struct _ffeintrin_imp_
   {
-    char *name;                        /* Name of implementation. */
+    const char *name;          /* Name of implementation. */
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
     ffecomGfrt gfrt_direct;    /* library routine, direct-callable form. */
     ffecomGfrt gfrt_f2c;       /* library routine, f2c-callable form. */
     ffecomGfrt gfrt_gnu;       /* library routine, gnu-callable form. */
 #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
-    char *control;
+    const char *control;
     char y2kbad;
   };
 
@@ -166,9 +166,9 @@ ffeintrin_check_ (ffeintrinImp imp, ffebldOp op,
                  ffelexToken t,
                  bool commit)
 {
-  char *c = ffeintrin_imps_[imp].control;
+  const char *c = ffeintrin_imps_[imp].control;
   bool subr = (c[0] == '-');
-  char *argc;
+  const char *argc;
   ffebld arg;
   ffeinfoBasictype bt;
   ffeinfoKindtype kt;
@@ -1165,9 +1165,9 @@ ffeintrin_check_any_ (ffebld arglist)
 static int
 ffeintrin_cmp_name_ (const void *name, const void *intrinsic)
 {
-  char *uc = (char *) ((struct _ffeintrin_name_ *) intrinsic)->name_uc;
-  char *lc = (char *) ((struct _ffeintrin_name_ *) intrinsic)->name_lc;
-  char *ic = (char *) ((struct _ffeintrin_name_ *) intrinsic)->name_ic;
+  const char *uc = ((struct _ffeintrin_name_ *) intrinsic)->name_uc;
+  const char *lc = ((struct _ffeintrin_name_ *) intrinsic)->name_lc;
+  const char *ic = ((struct _ffeintrin_name_ *) intrinsic)->name_ic;
 
   return ffesrc_strcmp_2c (ffe_case_intrin (), name, uc, lc, ic);
 }
@@ -1429,7 +1429,7 @@ ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info,
   ffeIntrinsicState state;
   ffebad error;
   bool any = FALSE;
-  char *name;
+  const char *name;
 
   op = ffebld_op (*expr);
   assert ((op == FFEBLD_opFUNCREF) || (op == FFEBLD_opSUBRREF));
@@ -1551,9 +1551,9 @@ void
 ffeintrin_init_0 ()
 {
   int i;
-  char *p1;
-  char *p2;
-  char *p3;
+  const char *p1;
+  const char *p2;
+  const char *p3;
   int colon;
 
   if (!ffe_is_do_internal_checks ())
@@ -1597,7 +1597,7 @@ ffeintrin_init_0 ()
 
   for (i = 0; ((size_t) i) < ARRAY_SIZE (ffeintrin_imps_); ++i)
     {
-      char *c = ffeintrin_imps_[i].control;
+      const char *c = ffeintrin_imps_[i].control;
 
       if (c[0] == '\0')
        continue;
@@ -1775,7 +1775,7 @@ ffeintrin_is_actualarg (ffeintrinSpec spec)
 
 /* Determine if name is intrinsic, return info.
 
-   char *name;                 // C-string name of possible intrinsic.
+   const char *name;           // C-string name of possible intrinsic.
    ffelexToken t;              // NULL if no diagnostic to be given.
    bool explicit;              // TRUE if INTRINSIC name.
    ffeintrinGen gen;           // (TRUE only) Generic id of intrinsic.
@@ -1787,7 +1787,7 @@ ffeintrin_is_actualarg (ffeintrinSpec spec)
                                // kind accordingly.  */
 
 bool
-ffeintrin_is_intrinsic (char *name, ffelexToken t, bool explicit,
+ffeintrin_is_intrinsic (const char *name, ffelexToken t, bool explicit,
                        ffeintrinGen *xgen, ffeintrinSpec *xspec,
                        ffeintrinImp *ximp)
 {
@@ -1998,7 +1998,7 @@ ffeintrin_kindtype (ffeintrinSpec spec)
 
 /* Return name of generic intrinsic.  */
 
-char *
+const char *
 ffeintrin_name_generic (ffeintrinGen gen)
 {
   assert (gen < FFEINTRIN_gen);
@@ -2007,7 +2007,7 @@ ffeintrin_name_generic (ffeintrinGen gen)
 
 /* Return name of intrinsic implementation.  */
 
-char *
+const char *
 ffeintrin_name_implementation (ffeintrinImp imp)
 {
   assert (imp < FFEINTRIN_imp);
@@ -2016,7 +2016,7 @@ ffeintrin_name_implementation (ffeintrinImp imp)
 
 /* Return external/internal name of specific intrinsic.         */
 
-char *
+const char *
 ffeintrin_name_specific (ffeintrinSpec spec)
 {
   assert (spec < FFEINTRIN_spec);
index 393552dae7a0d21410a39888ed8c28db2a26954b..5b8d725da43c531e274b5482bea8080e0a97e27e 100644 (file)
@@ -115,14 +115,14 @@ void ffeintrin_init_0 (void);
 #define ffeintrin_init_3()
 #define ffeintrin_init_4()
 bool ffeintrin_is_actualarg (ffeintrinSpec spec);
-bool ffeintrin_is_intrinsic (char *name, ffelexToken t, bool explicit,
+bool ffeintrin_is_intrinsic (const char *name, ffelexToken t, bool explicit,
                             ffeintrinGen *gen, ffeintrinSpec *spec,
                             ffeintrinImp *imp);
 bool ffeintrin_is_standard (ffeintrinGen gen, ffeintrinSpec spec);
 ffeinfoKindtype ffeintrin_kindtype (ffeintrinSpec spec);
-char *ffeintrin_name_generic (ffeintrinGen gen);
-char *ffeintrin_name_implementation (ffeintrinImp imp);
-char *ffeintrin_name_specific (ffeintrinSpec spec);
+const char *ffeintrin_name_generic (ffeintrinGen gen);
+const char *ffeintrin_name_implementation (ffeintrinImp imp);
+const char *ffeintrin_name_specific (ffeintrinSpec spec);
 ffeIntrinsicState ffeintrin_state_family (ffeintrinFamily family);
 #define ffeintrin_terminate_0()
 #define ffeintrin_terminate_1()
index eb30b1b3985bcfb37f2a13e376c1ba01b04341d3..3136d40252890f5ec959260588c8197505ef1e19 100644 (file)
@@ -1751,10 +1751,10 @@ ffelex_token_new_ ()
   return t;
 }
 
-static char *
+static const char *
 ffelex_type_string_ (ffelexType type)
 {
-  static char *types[] = {
+  static const char *types[] = {
     "FFELEX_typeNONE",
     "FFELEX_typeCOMMENT",
     "FFELEX_typeEOS",
@@ -4546,7 +4546,7 @@ ffelex_token_names_from_names (ffelexToken t, ffeTokenLength start,
 /* Make a new CHARACTER token.  */
 
 ffelexToken
-ffelex_token_new_character (char *s, ffewhereLine l, ffewhereColumn c)
+ffelex_token_new_character (const char *s, ffewhereLine l, ffewhereColumn c)
 {
   ffelexToken t;
 
@@ -4581,7 +4581,7 @@ ffelex_token_new_eof ()
 /* Make a new NAME token.  */
 
 ffelexToken
-ffelex_token_new_name (char *s, ffewhereLine l, ffewhereColumn c)
+ffelex_token_new_name (const char *s, ffewhereLine l, ffewhereColumn c)
 {
   ffelexToken t;
 
@@ -4602,7 +4602,7 @@ ffelex_token_new_name (char *s, ffewhereLine l, ffewhereColumn c)
 /* Make a new NAMES token.  */
 
 ffelexToken
-ffelex_token_new_names (char *s, ffewhereLine l, ffewhereColumn c)
+ffelex_token_new_names (const char *s, ffewhereLine l, ffewhereColumn c)
 {
   ffelexToken t;
 
@@ -4631,7 +4631,7 @@ ffelex_token_new_names (char *s, ffewhereLine l, ffewhereColumn c)
    in the original string.  */
 
 ffelexToken
-ffelex_token_new_number (char *s, ffewhereLine l, ffewhereColumn c)
+ffelex_token_new_number (const char *s, ffewhereLine l, ffewhereColumn c)
 {
   ffelexToken t;
   ffeTokenLength len;
index 440eaf66c14e3999b9f9b43c4e03b6f3aab6cec3..c82a9c86b9486a088f522a2e82daaea7ac8382d1 100644 (file)
@@ -148,14 +148,14 @@ ffelexToken ffelex_token_names_from_names (ffelexToken t,
                                           ffeTokenLength start,
                                           ffeTokenLength len);
 ffelexToken ffelex_token_new (void);
-ffelexToken ffelex_token_new_character (char *s, ffewhereLine l,
+ffelexToken ffelex_token_new_character (const char *s, ffewhereLine l,
                                        ffewhereColumn c);
 ffelexToken ffelex_token_new_eof (void);
-ffelexToken ffelex_token_new_name (char *s, ffewhereLine l,
+ffelexToken ffelex_token_new_name (const char *s, ffewhereLine l,
                                   ffewhereColumn c);
-ffelexToken ffelex_token_new_names (char *s, ffewhereLine l,
+ffelexToken ffelex_token_new_names (const char *s, ffewhereLine l,
                                    ffewhereColumn c);
-ffelexToken ffelex_token_new_number (char *s, ffewhereLine l,
+ffelexToken ffelex_token_new_number (const char *s, ffewhereLine l,
                                     ffewhereColumn c);
 ffelexToken ffelex_token_new_simple_ (ffelexType type, ffewhereLine l,
                                      ffewhereColumn c);
index 406200baddda5fd9e200d8fa9b31cf65fc10d0e0..b0d31af81ef0ae1206f38fd759cc92ad411c35dc 100644 (file)
@@ -70,7 +70,7 @@ struct _malloc_root_ malloc_root_
 
 static void *malloc_reserve_ = NULL;   /* For crashes. */
 #if MALLOC_DEBUG
-static char *malloc_types_[] =
+static const char *malloc_types_[] =
 {"KS", "KSR", "NF", "NFR", "US", "USR"};
 #endif
 
@@ -234,7 +234,7 @@ malloc_pool_kill (mallocPool p)
    Makes a new pool with the given name and default new-chunk allocation.  */
 
 mallocPool
-malloc_pool_new (char *name, mallocPool parent,
+malloc_pool_new (const char *name, mallocPool parent,
                 unsigned long chunks UNUSED)
 {
   mallocPool p;
@@ -384,7 +384,7 @@ malloc_new_ (mallocSize s)
    add it to the list of mallocArea_s for the pool.  */
 
 void *
-malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s)
+malloc_new_inpool_ (mallocPool pool, mallocType_ type, const char *name, mallocSize s)
 {
   void *ptr;
   mallocArea_ a;
@@ -437,7 +437,7 @@ malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s)
    you pass it a 0).  */
 
 void *
-malloc_new_zinpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s,
+malloc_new_zinpool_ (mallocPool pool, mallocType_ type, const char *name, mallocSize s,
                     int z)
 {
   void *ptr;
index 6f487fbc5b0dc6dff16996abca4e2a89af7dae69..d9efdf281dabdd956854880a345699937f833962 100644 (file)
@@ -109,14 +109,14 @@ void malloc_init (void);
 void malloc_kill_inpool_ (mallocPool pool, mallocType_ type, void *ptr,
                          mallocSize size);
 void *malloc_new_ (mallocSize size);
-void *malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name,
+void *malloc_new_inpool_ (mallocPool pool, mallocType_ type, const char *name,
                          mallocSize size);
-void *malloc_new_zinpool_ (mallocPool pool, mallocType_ type, char *name,
+void *malloc_new_zinpool_ (mallocPool pool, mallocType_ type, const char *name,
                           mallocSize size, int z);
 void malloc_pool_display (mallocPool p);
 char malloc_pool_find_ (mallocPool p, mallocPool parent);
 void malloc_pool_kill (mallocPool p);
-mallocPool malloc_pool_new (char *name, mallocPool parent, unsigned long chunks);
+mallocPool malloc_pool_new (const char *name, mallocPool parent, unsigned long chunks);
 mallocPool malloc_pool_use (mallocPool p);
 void *malloc_resize_ (void *ptr, mallocSize new_size);
 void *malloc_resize_inpool_ (mallocPool pool, mallocType_ type, void *ptr,
index c2cdf63a7878584ccd2c933898d50b819a769b47..360279b3151a45cf43f5ef12deb59ab2b2578c64 100644 (file)
@@ -167,7 +167,7 @@ ffename_lookup (ffenameSpace ns, ffelexToken t)
    ffename_space_drive_global(ns,fn);  */
 
 void
-ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ())
+ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) (ffeglobal))
 {
   ffename n;
 
@@ -188,7 +188,7 @@ ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ())
    ffename_space_drive_symbol(ns,fn);  */
 
 void
-ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) ())
+ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) (ffesymbol))
 {
   ffename n;
 
index dac3a78a1b2ce13c4289a6b67fc71133c0d2ded5..6c3499f07e0670a105f9a08c076c56ad951bd9db 100644 (file)
@@ -75,8 +75,8 @@ struct _ffename_space_
 ffename ffename_find (ffenameSpace ns, ffelexToken t);
 void ffename_kill (ffenameSpace ns, ffename n);
 ffename ffename_lookup (ffenameSpace ns, ffelexToken t);
-void ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ());
-void ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) ());
+void ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) (ffeglobal));
+void ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) (ffesymbol));
 void ffename_space_kill (ffenameSpace ns);
 ffenameSpace ffename_space_new (mallocPool pool);
 
index e66c7f2325740bf189e98be38021f8ca4152e330..98b27fedbb3f4b5cc04bcf4a78ea4500563e2149 100644 (file)
@@ -117,7 +117,7 @@ static ffesymbolRetract_ *ffesymbol_retract_list_;
 
 /* List of state names. */
 
-static char *ffesymbol_state_name_[] =
+static const char *ffesymbol_state_name_[] =
 {
   "?",
   "@",
@@ -127,7 +127,7 @@ static char *ffesymbol_state_name_[] =
 
 /* List of attribute names. */
 
-static char *ffesymbol_attr_name_[] =
+static const char *ffesymbol_attr_name_[] =
 {
 #define DEFATTR(ATTR,ATTRS,NAME) NAME,
 #include "symbol.def"
@@ -316,7 +316,7 @@ ffesymbol_whine_state_ (ffebad bad, ffelexToken t, char c)
 
 /* Returns a string representing the attributes set.  */
 
-char *
+const char *
 ffesymbol_attrs_string (ffesymbolAttrs attrs)
 {
   static char string[FFESYMBOL_attr * 12 + 20];
@@ -773,7 +773,7 @@ ffesymbol_declare_subrunit (ffelexToken t)
    ffesymbol_drive (fn);  */
 
 void
-ffesymbol_drive (ffesymbol (*fn) ())
+ffesymbol_drive (ffesymbol (*fn) (ffesymbol))
 {
   assert (ffesymbol_sfunc_ == NULL);   /* Might be ok, but not for current
                                           uses. */
@@ -787,7 +787,7 @@ ffesymbol_drive (ffesymbol (*fn) ())
    ffesymbol_drive_sfnames (fn);  */
 
 void
-ffesymbol_drive_sfnames (ffesymbol (*fn) ())
+ffesymbol_drive_sfnames (ffesymbol (*fn) (ffesymbol))
 {
   ffename_space_drive_symbol (ffesymbol_sfunc_, fn);
 }
@@ -1348,7 +1348,7 @@ ffesymbol_signal_change (ffesymbol s)
 
 /* Returns the string based on the state.  */
 
-char *
+const char *
 ffesymbol_state_string (ffesymbolState state)
 {
   if (state >= ARRAY_SIZE (ffesymbol_state_name_))
index 55cd48e021e4c0f35c0bea8a3896f32182af4a2a..6082669ea95b90c3570be60033c6461f9612a217 100644 (file)
@@ -158,7 +158,7 @@ struct _ffesymbol_
 #define ffesymbol_arraysize(s) ((s)->array_size)
 #define ffesymbol_attr(s,a) ((s)->attrs & ((ffesymbolAttrs) 1 << (a)))
 #define ffesymbol_attrs(s) ((s)->attrs)
-char *ffesymbol_attrs_string (ffesymbolAttrs attrs);
+const char *ffesymbol_attrs_string (ffesymbolAttrs attrs);
 #define ffesymbol_basictype(s) ffeinfo_basictype((s)->info)
 void ffesymbol_check (ffesymbol s, ffelexToken t, bool maybe_intrin);
 #define ffesymbol_common(s) ((s)->common)
@@ -177,8 +177,8 @@ ffesymbol ffesymbol_declare_sfdummy (ffelexToken t);
 ffesymbol ffesymbol_declare_subrunit (ffelexToken t);
 #define ffesymbol_dims(s) ((s)->dims)
 #define ffesymbol_dim_syms(s) ((s)->dim_syms)
-void ffesymbol_drive (ffesymbol (*fn) ());
-void ffesymbol_drive_sfnames (ffesymbol (*fn) ());
+void ffesymbol_drive (ffesymbol (*fn) (ffesymbol));
+void ffesymbol_drive_sfnames (ffesymbol (*fn) (ffesymbol));
 #define ffesymbol_dummyargs(s) ((s)->dummy_args)
 #if FFECOM_targetCURRENT == FFECOM_targetFFE
 void ffesymbol_dump (ffesymbol s);
@@ -269,7 +269,7 @@ void ffesymbol_signal_change (ffesymbol s);
 #define ffesymbol_specific(s) ((s)->specific)
 #define ffesymbol_state(s) ((s)->state)
 #define ffesymbol_state_is_specable(s) ((s) <= FFESYMBOL_stateSEEN)
-char *ffesymbol_state_string (ffesymbolState state);
+const char *ffesymbol_state_string (ffesymbolState state);
 #define ffesymbol_storage(s) ((s)->storage)
 void ffesymbol_terminate_0 (void);
 void ffesymbol_terminate_1 (void);
index d3e248e7d21bd9c065a9aecefaf16d351e8d37a6..5712bdd798abcda0aa3e219ca8a7976645b6cb82 100644 (file)
@@ -469,7 +469,7 @@ ffetarget_iszero_hollerith (ffetargetHollerith constant)
    data type info and the number of elements an array (1 for a scalar).         */
 
 void
-ffetarget_layout (char *error_text UNUSED, ffetargetAlign *alignment,
+ffetarget_layout (const char *error_text UNUSED, ffetargetAlign *alignment,
                  ffetargetAlign *modulo, ffetargetOffset *size,
                  ffeinfoBasictype bt, ffeinfoKindtype kt,
                  ffetargetCharacterSize charsize,
index 110e38f466c510cc201ef040e0d257ed6a08dd6b..467f10298cff490d66e43432e05aef64f5e427c2 100644 (file)
@@ -732,7 +732,7 @@ void ffetarget_integer_bad_magical_precedence_binary (ffelexToken integer,
 bool ffetarget_iszero_character1 (ffetargetCharacter1 constant);
 #endif
 bool ffetarget_iszero_hollerith (ffetargetHollerith constant);
-void ffetarget_layout (char *error_text, ffetargetAlign *alignment,
+void ffetarget_layout (const char *error_text, ffetargetAlign *alignment,
                       ffetargetAlign *modulo, ffetargetOffset *size,
                       ffeinfoBasictype bt, ffeinfoKindtype kt,
                       ffetargetCharacterSize charsize,