Commit e4b33ee5 by Jakub Jelinek Committed by Jakub Jelinek

re PR preprocessor/61977 (powerpc preprocessor breaks on lines that end with "vector")

	PR preprocessor/61977
	* lex.c (cpp_peek_token): If peektok is CPP_EOF, back it up
	with all tokens peeked by the current function.

	* gcc.dg/cpp/pr61977.c: New test.

From-SVN: r221882
parent 6f025043
2015-04-06 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/61977
* gcc.dg/cpp/pr61977.c: New test.
2015-04-06 Ilya Enkovich <ilya.enkovich@intel.com>
* gcc.dg/lto/chkp-ctor-merge_0.c: New.
......
/* PR preprocessor/61977 */
/* { dg-do preprocess } */
vector
2015-04-06 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/61977
* lex.c (cpp_peek_token): If peektok is CPP_EOF, back it up
with all tokens peeked by the current function.
2015-04-02 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/61977
......
......@@ -2090,11 +2090,14 @@ cpp_peek_token (cpp_reader *pfile, int index)
{
peektok = _cpp_lex_token (pfile);
if (peektok->type == CPP_EOF)
return peektok;
{
index--;
break;
}
}
while (index--);
_cpp_backup_tokens_direct (pfile, count + 1);
_cpp_backup_tokens_direct (pfile, count - index);
pfile->keep_tokens--;
pfile->cb.line_change = line_change;
......
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