Commit 3293c3e3 by Neil Booth Committed by Neil Booth

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
parent c29593dc
2001-11-19 Neil Booth <neil@daikokuya.demon.co.uk>
* cppmacro.c (_cpp_backup_tokens): Revert previous check-in.
Don't fall off the base token run.
2001-11-19 Jason Wilkins <fenix@io.com> 2001-11-19 Jason Wilkins <fenix@io.com>
* Makefile.in: Use INSTALL_SCRIPT not INSTALL_PROGRAM. * Makefile.in: Use INSTALL_SCRIPT not INSTALL_PROGRAM.
......
...@@ -1087,12 +1087,14 @@ _cpp_backup_tokens (pfile, count) ...@@ -1087,12 +1087,14 @@ _cpp_backup_tokens (pfile, count)
pfile->lookaheads += count; pfile->lookaheads += count;
while (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_run = pfile->cur_run->prev;
pfile->cur_token = pfile->cur_run->limit; pfile->cur_token = pfile->cur_run->limit;
} }
pfile->cur_token--;
} }
} }
else else
......
2001-11-19 Neil Booth <neil@daikokuya.demon.co.uk>
* gcc.dg/cpp/fpreprocessed.c: New test case.
2001-11-18 Joseph S. Myers <jsm28@cam.ac.uk> 2001-11-18 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc.dg/cpp/assert_trad1.c, gcc.dg/cpp/tr-paste.c, * gcc.dg/cpp/assert_trad1.c, gcc.dg/cpp/tr-paste.c,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment