diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-03-27 10:24:06 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-03-27 10:24:06 +0000 |
commit | 9a5bd8b1c0d3848db5248f6e0909c43c1ec0ea21 (patch) | |
tree | 7e09ee2a6c2fe78d743d5fb05a2b79c2356f2880 /gcc/f/intrin.c | |
parent | 3e8b52bc4d6c80a660e95df968955c1d36f94768 (diff) | |
download | gcc-9a5bd8b1c0d3848db5248f6e0909c43c1ec0ea21.tar.gz |
Warning fixes:
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26013 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/f/intrin.c')
-rw-r--r-- | gcc/f/intrin.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/gcc/f/intrin.c b/gcc/f/intrin.c index 6760be48676..dbf375b849f 100644 --- a/gcc/f/intrin.c +++ b/gcc/f/intrin.c @@ -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); |