From 18f41a1b45de2a83725299a8e6544c1f226dd4da Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 12 Apr 2009 23:20:02 +0100 Subject: 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 --- libcpp/macro.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libcpp/macro.c') diff --git a/libcpp/macro.c b/libcpp/macro.c index b6a7666..75c1c55 100644 --- a/libcpp/macro.c +++ b/libcpp/macro.c @@ -369,7 +369,9 @@ stringify_arg (cpp_reader *pfile, macro_arg *arg) if (token->type == CPP_PADDING) { - if (source == NULL) + if (source == NULL + || (!(source->flags & PREV_WHITE) + && token->val.source == NULL)) source = token->val.source; continue; } -- cgit v1.1