diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-11-19 21:04:49 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-11-19 21:04:49 +0000 |
commit | 3293c3e3f52424675063f2597769273c02add26e (patch) | |
tree | eab08fe20a56353d555d978f0d053e55c7091a6d /gcc/cppmacro.c | |
parent | c29593dc47a7ac359e81f8988d35ee99a1bc677a (diff) | |
download | gcc-3293c3e3f52424675063f2597769273c02add26e.zip gcc-3293c3e3f52424675063f2597769273c02add26e.tar.gz gcc-3293c3e3f52424675063f2597769273c02add26e.tar.bz2 |
cppmacro.c (_cpp_backup_tokens): Revert previous check-in.
* cppmacro.c (_cpp_backup_tokens): Revert previous check-in.
Don't fall off the base token run.
* gcc.dg/cpp/fpreprocessed.c: New test case.
From-SVN: r47182
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r-- | gcc/cppmacro.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index dbee62d..17dfe15 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -1087,12 +1087,14 @@ _cpp_backup_tokens (pfile, count) pfile->lookaheads += count; while (count--) { - if (pfile->cur_token == pfile->cur_run->base) + pfile->cur_token--; + if (pfile->cur_token == pfile->cur_run->base + /* Possible with -fpreprocessed and no leading #line. */ + && pfile->cur_run->prev != NULL) { pfile->cur_run = pfile->cur_run->prev; pfile->cur_token = pfile->cur_run->limit; } - pfile->cur_token--; } } else |