From e64237680a293fa3e7ee3104723e9c71a514265d Mon Sep 17 00:00:00 2001 From: ghazi Date: Wed, 12 Sep 2001 16:52:42 +0000 Subject: [PATCH] * bld.c (ffebld_op_string_): Const-ification. * com.c (ffecom_gfrt_name_, ffecom_gfrt_argstring_): Likewise. * fini.c (xspaces): Likewise. * global.c (ffeglobal_type_string_): Likewise. * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_, ffeinfo_kind_string_, ffeinfo_kindtype_string_, ffeinfo_where_string_): Likewise. * lex.c (ffelex_type_string_): Likewise. * malloc.c (malloc_types_): Likewise. * stc.c (ffestc_subr_binsrch_, ffestc_R904, ffestc_R904, ffestc_R907): Likewise. * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_): Likewise. * version.c (ffe_version_string): Likewise. * version.h (ffe_version_string): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45566 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/f/ChangeLog | 18 ++++++++++++++++++ gcc/f/bld.c | 2 +- gcc/f/com.c | 4 ++-- gcc/f/fini.c | 2 +- gcc/f/global.c | 2 +- gcc/f/info.c | 10 +++++----- gcc/f/lex.c | 2 +- gcc/f/malloc.c | 2 +- gcc/f/stc.c | 33 +++++++++++++++++---------------- gcc/f/symbol.c | 4 ++-- gcc/f/version.c | 2 +- gcc/f/version.h | 2 +- 12 files changed, 51 insertions(+), 32 deletions(-) diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 9fc724d3d97..5c6f3492d15 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,21 @@ +Wed Sep 12 12:09:04 2001 Kaveh R. Ghazi + + * bld.c (ffebld_op_string_): Const-ification. + * com.c (ffecom_gfrt_name_, ffecom_gfrt_argstring_): Likewise. + * fini.c (xspaces): Likewise. + * global.c (ffeglobal_type_string_): Likewise. + * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_, + ffeinfo_kind_string_, ffeinfo_kindtype_string_, + ffeinfo_where_string_): Likewise. + * lex.c (ffelex_type_string_): Likewise. + * malloc.c (malloc_types_): Likewise. + * stc.c (ffestc_subr_binsrch_, ffestc_R904, ffestc_R904, + ffestc_R907): Likewise. + * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_): + Likewise. + * version.c (ffe_version_string): Likewise. + * version.h (ffe_version_string): Likewise. + 2001-09-11 Richard Henderson * parse.c (finput): Mark extern. diff --git a/gcc/f/bld.c b/gcc/f/bld.c index 15cadf196d1..dd4c8603746 100644 --- a/gcc/f/bld.c +++ b/gcc/f/bld.c @@ -203,7 +203,7 @@ static ffebldConstant ffebld_constant_hollerith_; static ffebldConstant ffebld_constant_typeless_[FFEBLD_constTYPELESS_LAST - FFEBLD_constTYPELESS_FIRST + 1]; -static const char *ffebld_op_string_[] +static const char *const ffebld_op_string_[] = { #define FFEBLD_OP(KWD,NAME,ARITY) NAME, diff --git a/gcc/f/com.c b/gcc/f/com.c index 137b72fa9ac..bdf3e7cee76 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -448,7 +448,7 @@ static tree ffecom_gfrt_[FFECOM_gfrt] /* Holds the external names of the functions. */ -static const char *ffecom_gfrt_name_[FFECOM_gfrt] +static const char *const ffecom_gfrt_name_[FFECOM_gfrt] = { #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX,CONST) NAME, @@ -499,7 +499,7 @@ static ffecomRttype_ ffecom_gfrt_type_[FFECOM_gfrt] /* String of codes for the function's arguments. */ -static const char *ffecom_gfrt_argstring_[FFECOM_gfrt] +static const char *const ffecom_gfrt_argstring_[FFECOM_gfrt] = { #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX,CONST) ARGS, diff --git a/gcc/f/fini.c b/gcc/f/fini.c index 362c0b627f9..cfb5ffd2306 100644 --- a/gcc/f/fini.c +++ b/gcc/f/fini.c @@ -62,7 +62,7 @@ static FILE *out; static char prefix[32]; static char postfix[32]; static char storage[32]; -static const char *xspaces[] +static const char *const xspaces[] = { "", /* 0 */ diff --git a/gcc/f/global.c b/gcc/f/global.c index 85311f18601..1fe92701a12 100644 --- a/gcc/f/global.c +++ b/gcc/f/global.c @@ -60,7 +60,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #if FFEGLOBAL_ENABLED static ffenameSpace ffeglobal_filewide_ = NULL; -static const char *ffeglobal_type_string_[] = +static const char *const ffeglobal_type_string_[] = { [FFEGLOBAL_typeNONE] "??", [FFEGLOBAL_typeMAIN] "main program", diff --git a/gcc/f/info.c b/gcc/f/info.c index 784e699e08c..b3ceef1d99c 100644 --- a/gcc/f/info.c +++ b/gcc/f/info.c @@ -55,21 +55,21 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* Static objects accessed by functions in this module. */ -static const char *ffeinfo_basictype_string_[] +static const char *const ffeinfo_basictype_string_[] = { #define FFEINFO_BASICTYPE(KWD,LNAM,SNAM) SNAM, #include "info-b.def" #undef FFEINFO_BASICTYPE }; -static const char *ffeinfo_kind_message_[] +static const char *const ffeinfo_kind_message_[] = { #define FFEINFO_KIND(KWD,LNAM,SNAM) LNAM, #include "info-k.def" #undef FFEINFO_KIND }; -static const char *ffeinfo_kind_string_[] +static const char *const ffeinfo_kind_string_[] = { #define FFEINFO_KIND(KWD,LNAM,SNAM) SNAM, @@ -77,7 +77,7 @@ static const char *ffeinfo_kind_string_[] #undef FFEINFO_KIND }; static ffeinfoBasictype ffeinfo_combine_[FFEINFO_basictype][FFEINFO_basictype]; -static const char *ffeinfo_kindtype_string_[] +static const char *const ffeinfo_kindtype_string_[] = { "", @@ -91,7 +91,7 @@ static const char *ffeinfo_kindtype_string_[] "8", "*", }; -static const char *ffeinfo_where_string_[] +static const char *const ffeinfo_where_string_[] = { #define FFEINFO_WHERE(KWD,LNAM,SNAM) SNAM, diff --git a/gcc/f/lex.c b/gcc/f/lex.c index 05e627bdc8b..9f49c7ec851 100644 --- a/gcc/f/lex.c +++ b/gcc/f/lex.c @@ -1742,7 +1742,7 @@ ffelex_token_new_ () static const char * ffelex_type_string_ (ffelexType type) { - static const char *types[] = { + static const char *const types[] = { "FFELEX_typeNONE", "FFELEX_typeCOMMENT", "FFELEX_typeEOS", diff --git a/gcc/f/malloc.c b/gcc/f/malloc.c index 032c2bfdfbf..77e2e4a12e2 100644 --- a/gcc/f/malloc.c +++ b/gcc/f/malloc.c @@ -70,7 +70,7 @@ struct _malloc_root_ malloc_root_ static void *malloc_reserve_ = NULL; /* For crashes. */ #if MALLOC_DEBUG -static const char *malloc_types_[] = +static const char *const malloc_types_[] = {"KS", "KSR", "NF", "NFR", "US", "USR"}; #endif diff --git a/gcc/f/stc.c b/gcc/f/stc.c index 50a196ef592..8a7efa6fc55 100644 --- a/gcc/f/stc.c +++ b/gcc/f/stc.c @@ -339,8 +339,8 @@ static void ffestc_shriek_where_ (bool ok); #if FFESTR_F90 static void ffestc_shriek_wherethen_ (bool ok); #endif -static int ffestc_subr_binsrch_ (const char **list, int size, ffestpFile *spec, - const char *whine); +static int ffestc_subr_binsrch_ (const char *const *list, int size, + ffestpFile *spec, const char *whine); static ffestvFormat ffestc_subr_format_ (ffestpFile *spec); static bool ffestc_subr_is_branch_ (ffestpFile *spec); static bool ffestc_subr_is_format_ (ffestpFile *spec); @@ -5044,7 +5044,8 @@ ffestc_shriek_wherethen_ (bool ok) using "etc" as the pick-one-of-these string. */ static int -ffestc_subr_binsrch_ (const char **list, int size, ffestpFile *spec, const char *whine) +ffestc_subr_binsrch_ (const char *const *list, int size, ffestpFile *spec, + const char *whine) { int lowest_tested; int highest_tested; @@ -10202,7 +10203,7 @@ ffestc_R904 () { int i; int expect_file; - const char *status_strs[] + const char *const status_strs[] = { "New", @@ -10211,7 +10212,7 @@ ffestc_R904 () "Scratch", "Unknown" }; - const char *access_strs[] + const char *const access_strs[] = { "Append", @@ -10219,20 +10220,20 @@ ffestc_R904 () "Keyed", "Sequential" }; - const char *blank_strs[] + const char *const blank_strs[] = { "Null", "Zero" }; - const char *carriagecontrol_strs[] + const char *const carriagecontrol_strs[] = { "Fortran", "List", "None" }; - const char *dispose_strs[] + const char *const dispose_strs[] = { "Delete", @@ -10243,41 +10244,41 @@ ffestc_R904 () "Submit", "Submit/Delete" }; - const char *form_strs[] + const char *const form_strs[] = { "Formatted", "Unformatted" }; - const char *organization_strs[] + const char *const organization_strs[] = { "Indexed", "Relative", "Sequential" }; - const char *position_strs[] + const char *const position_strs[] = { "Append", "AsIs", "Rewind" }; - const char *action_strs[] + const char *const action_strs[] = { "Read", "ReadWrite", "Write" }; - const char *delim_strs[] + const char *const delim_strs[] = { "Apostrophe", "None", "Quote" }; - const char *recordtype_strs[] + const char *const recordtype_strs[] = { "Fixed", @@ -10287,7 +10288,7 @@ ffestc_R904 () "Stream_LF", "Variable" }; - const char *pad_strs[] + const char *const pad_strs[] = { "No", @@ -10457,7 +10458,7 @@ ffestc_R904 () void ffestc_R907 () { - const char *status_strs[] + const char *const status_strs[] = { "Delete", diff --git a/gcc/f/symbol.c b/gcc/f/symbol.c index f6c220283d1..424a9c61292 100644 --- a/gcc/f/symbol.c +++ b/gcc/f/symbol.c @@ -117,7 +117,7 @@ static ffesymbolRetract_ *ffesymbol_retract_list_; /* List of state names. */ -static const char *ffesymbol_state_name_[] = +static const char *const ffesymbol_state_name_[] = { "?", "@", @@ -127,7 +127,7 @@ static const char *ffesymbol_state_name_[] = /* List of attribute names. */ -static const char *ffesymbol_attr_name_[] = +static const char *const ffesymbol_attr_name_[] = { #define DEFATTR(ATTR,ATTRS,NAME) NAME, #include "symbol.def" diff --git a/gcc/f/version.c b/gcc/f/version.c index 21760da0c7a..460fd1194c2 100644 --- a/gcc/f/version.c +++ b/gcc/f/version.c @@ -1 +1 @@ -const char *ffe_version_string = "0.5.27 20010912 (experimental)"; +const char *const ffe_version_string = "0.5.27 20010912 (experimental)"; diff --git a/gcc/f/version.h b/gcc/f/version.h index c612071ddbe..fe775519707 100644 --- a/gcc/f/version.h +++ b/gcc/f/version.h @@ -1,6 +1,6 @@ #ifndef GCC_F_VERSION_H #define GCC_F_VERSION_H -extern const char *ffe_version_string; +extern const char *const ffe_version_string; #endif /* ! GCC_F_VERSION_H */ -- 2.11.0