Commit 18f41a1b by Joseph Myers Committed by Joseph Myers

re PR preprocessor/31869 (stringifying empty macros)

libcpp:
	PR preprocessor/31869
	* macro.c (stringify_arg): Handle NULL source token in padding
	token where previous padding token did not have source token with
	preceding whitespace.

gcc/testsuite:
	* gcc.dg/cpp/strify5.c: New test.

From-SVN: r145989
parent 849d624b
2009-04-12 Joseph Myers <joseph@codesourcery.com>
PR preprocessor/31869
* gcc.dg/cpp/strify5.c: New test.
2009-04-12 Eric Botcazou <ebotcazou@adacore.com> 2009-04-12 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/enum1.adb: New test. * gnat.dg/enum1.adb: New test.
......
2009-04-12 Joseph Myers <joseph@codesourcery.com>
PR preprocessor/31869
* macro.c (stringify_arg): Handle NULL source token in padding
token where previous padding token did not have source token with
preceding whitespace.
2009-04-09 Jakub Jelinek <jakub@redhat.com> 2009-04-09 Jakub Jelinek <jakub@redhat.com>
* Makefile.in: Change copyright header to refer to version * Makefile.in: Change copyright header to refer to version
......
...@@ -369,7 +369,9 @@ stringify_arg (cpp_reader *pfile, macro_arg *arg) ...@@ -369,7 +369,9 @@ stringify_arg (cpp_reader *pfile, macro_arg *arg)
if (token->type == CPP_PADDING) if (token->type == CPP_PADDING)
{ {
if (source == NULL) if (source == NULL
|| (!(source->flags & PREV_WHITE)
&& token->val.source == NULL))
source = token->val.source; source = token->val.source;
continue; continue;
} }
......
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