From 3293c3e3f52424675063f2597769273c02add26e Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Mon, 19 Nov 2001 21:04:49 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/cppmacro.c | 6 ++++-- gcc/testsuite/ChangeLog | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ddcdb3044ad..c909c1cf61f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-11-19 Neil Booth + + * cppmacro.c (_cpp_backup_tokens): Revert previous check-in. + Don't fall off the base token run. + 2001-11-19 Jason Wilkins * Makefile.in: Use INSTALL_SCRIPT not INSTALL_PROGRAM. diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index dbee62d887b..17dfe1566b0 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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a4038a75f30..cebf71d4cbb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-11-19 Neil Booth + + * gcc.dg/cpp/fpreprocessed.c: New test case. + 2001-11-18 Joseph S. Myers * gcc.dg/cpp/assert_trad1.c, gcc.dg/cpp/tr-paste.c,