diff options
Diffstat (limited to 'contrib/gcc/f/stb.c')
-rw-r--r-- | contrib/gcc/f/stb.c | 122 |
1 files changed, 64 insertions, 58 deletions
diff --git a/contrib/gcc/f/stb.c b/contrib/gcc/f/stb.c index dc4bda4..ef523c4 100644 --- a/contrib/gcc/f/stb.c +++ b/contrib/gcc/f/stb.c @@ -1,6 +1,6 @@ /* stb.c -- Implementation File (module.c template V1.0) Copyright (C) 1995, 1996 Free Software Foundation, Inc. - Contributed by James Craig Burley (burley@gnu.org). + Contributed by James Craig Burley. This file is part of GNU Fortran. @@ -404,7 +404,7 @@ union ffestb_local_u_ dimlist; struct { - char *badname; + const char *badname; ffestrFirst first_kw; bool is_subr; } @@ -421,7 +421,7 @@ union ffestb_local_u_ ffesttTokenList toklist;/* For ambiguity resolution. */ ffesttImpList imps; /* List of IMPLICIT letters. */ ffelexHandler imp_handler; /* Call if paren list wasn't letters. */ - char *badname; + const char *badname; ffestrOther kw; /* INTENT(IN/OUT/INOUT). */ ffestpType type; bool parameter; /* If PARAMETER attribute seen (governs =expr @@ -1859,7 +1859,7 @@ ffelexHandler ffestb_do (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffelexHandler next; ffelexToken nt; ffestrSecond kw; @@ -2033,7 +2033,7 @@ ffelexHandler ffestb_dowhile (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; ffelexHandler next; ffelexToken nt; @@ -2507,7 +2507,7 @@ ffelexHandler ffestb_else (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -2600,7 +2600,7 @@ ffelexHandler ffestb_elsexyz (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -2787,7 +2787,7 @@ static ffelexHandler ffestb_else3_ (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffelex_set_names (FALSE); @@ -3013,7 +3013,7 @@ ffelexHandler ffestb_endxyz (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -3319,7 +3319,7 @@ ffelexHandler ffestb_goto (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffelexHandler next; ffelexToken nt; @@ -4152,7 +4152,7 @@ ffestb_let (ffelexToken t) ffelexHandler next; bool vxtparam; /* TRUE if it might really be a VXT PARAMETER stmt. */ - char *p; + unsigned const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -4292,7 +4292,7 @@ ffelexHandler ffestb_type (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -4376,7 +4376,7 @@ static ffelexHandler ffestb_type1_ (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; ffelex_set_names (FALSE); @@ -4537,7 +4537,7 @@ ffelexHandler ffestb_varlist (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffelexToken nt; ffelexHandler next; @@ -5215,7 +5215,7 @@ ffestb_varlist6_ (ffelexToken t) ffelexHandler ffestb_R423B (ffelexToken t) { - char *p; + const char *p; ffeTokenLength i; switch (ffelex_token_type (ffesta_tokens[0])) @@ -5284,7 +5284,7 @@ ffelexHandler ffestb_R522 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffelexToken nt; ffelexHandler next; @@ -5528,7 +5528,7 @@ ffestb_R5224_ (ffelexToken t) ffelexHandler ffestb_R528 (ffelexToken t) { - char *p; + unsigned const char *p; ffeTokenLength i; ffelexToken nt; ffelexHandler next; @@ -5707,7 +5707,12 @@ ffestb_R5282_ (ffelexToken ft, ffebld expr, ffelexToken t) case FFELEX_typeASTERISK: if (expr == NULL) break; - ffestb_local_.data.expr = expr; + ffestb_local_.data.expr = ffeexpr_convert (expr, ft, t, + FFEINFO_basictypeINTEGER, + FFEINFO_kindtypeINTEGER1, + 0, + FFETARGET_charactersizeNONE, + FFEEXPR_contextLET); ffesta_tokens[1] = ffelex_token_use (ft); return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, FFEEXPR_contextDATA, @@ -6005,7 +6010,7 @@ ffestb_R5373_ (ffelexToken t) ffelexHandler ffestb_R542 (ffelexToken t) { - char *p; + const char *p; ffeTokenLength i; switch (ffelex_token_type (ffesta_tokens[0])) @@ -6419,7 +6424,7 @@ ffelexHandler ffestb_R834 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -6534,7 +6539,7 @@ ffelexHandler ffestb_R835 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -6648,7 +6653,7 @@ ffestb_R8351_ (ffelexToken t) ffelexHandler ffestb_R838 (ffelexToken t) { - char *p; + unsigned const char *p; ffeTokenLength i; ffelexHandler next; ffelexToken et; /* First token in target. */ @@ -7073,7 +7078,7 @@ ffestb_R8407_ (ffelexToken t) ffelexHandler ffestb_R841 (ffelexToken t) { - char *p; + const char *p; ffeTokenLength i; switch (ffelex_token_type (ffesta_tokens[0])) @@ -7141,7 +7146,7 @@ ffelexHandler ffestb_R1102 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -7293,7 +7298,7 @@ ffelexHandler ffestb_blockdata (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -7436,7 +7441,7 @@ ffelexHandler ffestb_R1212 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffelexHandler next; ffelexToken nt; @@ -7675,7 +7680,7 @@ ffestb_R12271_ (ffelexToken ft, ffebld expr, ffelexToken t) ffelexHandler ffestb_R1228 (ffelexToken t) { - char *p; + const char *p; ffeTokenLength i; switch (ffelex_token_type (ffesta_tokens[0])) @@ -7744,7 +7749,7 @@ bad_i: /* :::::::::::::::::::: */ ffelexHandler ffestb_V009 (ffelexToken t) { - char *p; + const char *p; ffeTokenLength i; switch (ffelex_token_type (ffesta_tokens[0])) @@ -8156,7 +8161,7 @@ ffelexHandler ffestb_module (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; ffelexToken nt; ffelexToken mt; /* Name in MODULE PROCEDUREname, i.e. includes "PROCEDURE". */ @@ -8429,7 +8434,7 @@ ffelexHandler ffestb_R809 (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -8630,7 +8635,7 @@ ffelexHandler ffestb_R810 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -9185,7 +9190,7 @@ ffestb_R10014_ (ffelexToken t) { ffesttFormatList f; ffeTokenLength i; - char *p; + const char *p; ffestrFormat kw; ffelex_set_expecting_hollerith (0, '\0', @@ -9709,7 +9714,8 @@ ffestb_R10014_ (ffelexToken t) i += ffelex_token_length (ffestb_local_.format.post.t); if (*p == '\0') return (ffelexHandler) ffestb_R10016_; - if ((kw != FFESTR_formatP) || !ffelex_is_firstnamechar (*p)) + if ((kw != FFESTR_formatP) || + !ffelex_is_firstnamechar ((unsigned char)*p)) { if (ffestb_local_.format.current != FFESTP_formattypeH) ffesta_ffebad_1p (FFEBAD_FORMAT_TEXT_IN_NUMBER, t, i, NULL); @@ -9813,7 +9819,7 @@ ffestb_R10015_ (ffelexToken t) bool split_pea; /* New NAMES requires splitting kP from new edit desc. */ ffestrFormat kw; - char *p; + const char *p; ffeTokenLength i; switch (ffelex_token_type (t)) @@ -10190,7 +10196,7 @@ static ffelexHandler ffestb_R10018_ (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; switch (ffelex_token_type (t)) { @@ -10984,7 +10990,7 @@ ffelexHandler ffestb_R1107 (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -11430,7 +11436,7 @@ ffelexHandler ffestb_R1202 (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -11821,7 +11827,7 @@ ffestb_R12025_ (ffelexToken t) static ffelexHandler ffestb_R12026_ (ffelexToken t) { - char *p; + const char *p; switch (ffelex_token_type (t)) { @@ -11964,7 +11970,7 @@ ffelexHandler ffestb_S3P4 (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; ffelexHandler next; ffelexToken nt; ffelexToken ut; @@ -12096,7 +12102,7 @@ ffestb_S3P41_ (ffelexToken ft, ffebld expr, ffelexToken t) ffelexHandler ffestb_V012 (ffelexToken t) { - char *p; + const char *p; ffeTokenLength i; switch (ffelex_token_type (ffesta_tokens[0])) @@ -12165,7 +12171,7 @@ ffelexHandler ffestb_V014 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffelexToken nt; ffelexHandler next; @@ -12399,7 +12405,7 @@ ffelexHandler ffestb_V025 (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; ffelexToken nt; ffelexHandler next; @@ -12595,7 +12601,7 @@ ffestb_V0254_ (ffelexToken ft, ffebld expr, ffelexToken t) static ffelexHandler ffestb_V0255_ (ffelexToken t) { - char *p; + const char *p; switch (ffelex_token_type (t)) { @@ -17909,7 +17915,7 @@ ffelexHandler ffestb_V020 (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; ffelexHandler next; ffestpTypeIx ix; @@ -18845,7 +18851,7 @@ ffelexHandler ffestb_dimlist (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; ffelexToken nt; ffelexHandler next; @@ -19399,7 +19405,7 @@ ffelexHandler ffestb_dummy (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -19618,7 +19624,7 @@ ffelexHandler ffestb_R524 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffelexToken nt; ffelexHandler next; @@ -19847,7 +19853,7 @@ ffelexHandler ffestb_R547 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffelexToken nt; ffelexHandler next; @@ -20485,7 +20491,7 @@ ffelexHandler ffestb_decl_chartype (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffestb_local_.decl.type = FFESTP_typeCHARACTER; ffestb_local_.decl.recursive = NULL; @@ -20672,7 +20678,7 @@ ffelexHandler ffestb_decl_dbltype (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffestb_local_.decl.type = ffestb_args.decl.type; ffestb_local_.decl.recursive = NULL; @@ -20863,7 +20869,7 @@ ffelexHandler ffestb_decl_gentype (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffestb_local_.decl.type = ffestb_args.decl.type; ffestb_local_.decl.recursive = NULL; @@ -21009,7 +21015,7 @@ ffelexHandler ffestb_decl_recursive (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; ffelexToken nt; ffelexToken ot; ffelexHandler next; @@ -22667,7 +22673,7 @@ ffestb_decl_entsp_2_ (ffelexToken t) { ffelexToken nt; bool asterisk_ok; - char *p; + unsigned const char *p; ffeTokenLength i; switch (ffelex_token_type (t)) @@ -23094,7 +23100,7 @@ ffestb_decl_entsp_8_ (ffelexToken t) static ffelexHandler ffestb_decl_func_ (ffelexToken t) { - char *p; + const char *p; ffeTokenLength i; ffelex_set_names (FALSE); @@ -23572,7 +23578,7 @@ ffelexHandler ffestb_V003 (ffelexToken t) { ffeTokenLength i; - char *p; + const char *p; ffelexToken nt; ffelexHandler next; @@ -23888,7 +23894,7 @@ bad: /* :::::::::::::::::::: */ ffelexHandler ffestb_V016 (ffelexToken t) { - char *p; + const char *p; ffeTokenLength i; switch (ffelex_token_type (ffesta_tokens[0])) @@ -24156,7 +24162,7 @@ ffestb_V0166_ (ffelexToken t) ffelexHandler ffestb_V027 (ffelexToken t) { - char *p; + unsigned const char *p; ffeTokenLength i; switch (ffelex_token_type (ffesta_tokens[0])) @@ -24336,7 +24342,7 @@ ffelexHandler ffestb_decl_R539 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned const char *p; ffelexToken nt; ffestrSecond kw; |