diff options
Diffstat (limited to 'gcc/f/lex.c')
-rw-r--r-- | gcc/f/lex.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/f/lex.c b/gcc/f/lex.c index 3136d402528..b6198b215f1 100644 --- a/gcc/f/lex.c +++ b/gcc/f/lex.c @@ -1126,8 +1126,9 @@ ffelex_hash_ (FILE *finput) static char buffer [128]; char * buff = buffer; - /* Read the pragma name into a buffer. */ - while (isspace (c = getc (finput))) + /* Read the pragma name into a buffer. + ISSPACE() may evaluate its argument more than once! */ + while (((c = getc (finput)), ISSPACE(c))) continue; do @@ -1135,7 +1136,7 @@ ffelex_hash_ (FILE *finput) * buff ++ = c; c = getc (finput); } - while (c != EOF && ! isspace (c) && c != '\n' + while (c != EOF && ! ISSPACE (c) && c != '\n' && buff < buffer + 128); pragma_ungetc (c); |