warnings fixes, Fortran subdir
Zack Weinberg
zack@wolery.cumb.org
Tue Feb 1 16:15:00 GMT 2000
On Tue, Feb 01, 2000 at 03:31:11PM -0800, Richard Henderson wrote:
> On Tue, Feb 01, 2000 at 01:32:27PM -0800, Zack Weinberg wrote:
> > * expr.c (ffeexpr_percent_): Clamp token length before
> > switching.
> > * fini.c: Likewise.
> > * lex.c (ffelex_prepare_eos_, ffelex_file_fixed,
> > ffelex_file_free): Convert switch on ffelex_raw_mode_ to
> > if-else if chain.
> > (ffelex_set_expecting_hollerith): Convert switch on length to
> > if-else if chain.
>
> Better to change the types involved to int.
I didn't want to do that because long is used consistently throughout
the front end, but OK.
zw
* lex.c (ffelex_expecting_hollerith_, ffelex_raw_mode_):
Change type to int.
(ffelex_set_expecting_hollerith): Change type of first arg to
int.
* lex.h: Update prototype.
* top.h: Change typedef of ffeTokenLength to int.
===================================================================
Index: f/lex.c
--- f/lex.c 1999/12/30 19:44:13 1.15
+++ f/lex.c 2000/02/02 00:12:46
@@ -175,14 +175,14 @@ static long int ffelex_token_nextid_ = 0
/* >0 if a Hollerith constant of that length might be in mid-lex, used
when the next character seen is 'H' or 'h' to enter HOLLERITH lexing
mode (see ffelex_raw_mode_). */
-static long int ffelex_expecting_hollerith_;
+static int ffelex_expecting_hollerith_;
/* -3: Backslash (escape) sequence being lexed in CHARACTER.
-2: Possible closing apostrophe/quote seen in CHARACTER.
-1: Lexing CHARACTER.
0: Not lexing CHARACTER or HOLLERITH.
>0: Lexing HOLLERITH, value is # chars remaining to expect. */
-static long int ffelex_raw_mode_;
+static int ffelex_raw_mode_;
/* When lexing CHARACTER, open quote/apostrophe (either ' or "). */
static char ffelex_raw_char_;
@@ -4184,7 +4184,7 @@ ffelex_line_number ()
which should be apostrophe or double-quote, to support Fortran 90. */
void
-ffelex_set_expecting_hollerith (long length, char which,
+ffelex_set_expecting_hollerith (int length, char which,
ffewhereLine line, ffewhereColumn column)
{
===================================================================
Index: f/lex.h
--- f/lex.h 1999/03/27 10:23:58 1.6
+++ f/lex.h 2000/02/02 00:12:46
@@ -127,7 +127,7 @@ bool ffelex_is_names_expected (void);
char *ffelex_line (void);
ffewhereColumnNumber ffelex_line_length (void);
ffewhereLineNumber ffelex_line_number (void);
-void ffelex_set_expecting_hollerith (long length, char which,
+void ffelex_set_expecting_hollerith (int length, char which,
ffewhereLine line,
ffewhereColumn column);
void ffelex_set_handler (ffelexHandler first);
===================================================================
Index: f/top.h
--- f/top.h 1999/10/16 01:22:40 1.11
+++ f/top.h 2000/02/02 00:12:46
@@ -63,8 +63,8 @@ typedef enum _ffeintrinsic_state_ ffeInt
typedef unsigned long ffeCounter;
#define ffeCounter_f "l"
typedef unsigned int ffeKwIndex;
-typedef unsigned long int ffeTokenLength;
-#define ffeTokenLength_f "l"
+typedef unsigned int ffeTokenLength;
+#define ffeTokenLength_f ""
typedef void *ffeUnionLongPtr; /* unused type to cover union of long and
ptr. */
More information about the Gcc-patches
mailing list