lex.c (ffelex_hash_): Avoid eating one whole line after #line.
* lex.c (ffelex_hash_): Avoid eating one whole line after #line. * g77.f-torture/compile/20010321-1.f: New test. From-SVN: r41015
This commit is contained in:
parent
0003efa0b3
commit
caf4d6e069
4 changed files with 23 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-04-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* lex.c (ffelex_hash_): Avoid eating one whole line after
|
||||
#line.
|
||||
|
||||
2001-04-02 Zack Weinberg <zackw@stanford.edu>
|
||||
|
||||
* genattr.c, gencheck.c, gencodes.c, genconfig.c, genflags.c,
|
||||
|
|
|
@ -1412,6 +1412,12 @@ ffelex_hash_ (FILE *finput)
|
|||
input_filename = old_input_filename;
|
||||
error ("Use `#line ...' instead of `# ...' in first line");
|
||||
}
|
||||
if (c == '\n' || c == EOF)
|
||||
{
|
||||
if (token != NULL && !ffelex_kludge_flag_)
|
||||
ffelex_token_kill (token);
|
||||
return c;
|
||||
}
|
||||
}
|
||||
else
|
||||
error ("invalid #-line");
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2001-04-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* g77.f-torture/compile/20010321-1.f: New test.
|
||||
|
||||
2001-04-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gcc.c-torture/compile/20010329-1.c: New test.
|
||||
|
|
8
gcc/testsuite/g77.f-torture/compile/20010321-1.f
Normal file
8
gcc/testsuite/g77.f-torture/compile/20010321-1.f
Normal file
|
@ -0,0 +1,8 @@
|
|||
# 1 "20010321-1.f"
|
||||
SUBROUTINE TWOEXP
|
||||
# 1 "include/implicit.h" 1 3
|
||||
IMPLICIT DOUBLE PRECISION (A-H)
|
||||
# 3 "20010321-1.f" 2 3
|
||||
LOGICAL ANTI
|
||||
ANTI = .FALSE.
|
||||
END
|
Loading…
Add table
Reference in a new issue