From 66cf1d6099e7edf80f8deecf20cf83ade79dddfe Mon Sep 17 00:00:00 2001 From: kristerw Date: Mon, 26 May 2003 00:03:50 +0000 Subject: Handle comments in macros when the -C flag is specified to the pre-processor. This makes code of the form #define FOO(X) (BAR(X)) #define BAR(X) (X) #define BAZ 23 /* comment, comment. */ int foo(void) { return FOO(BAZ); } be output as expected. (The old behaviour got confused by the ',' within the comment.) --- gnu/dist/toolchain/gcc/cccp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/dist/toolchain/gcc/cccp.c b/gnu/dist/toolchain/gcc/cccp.c index 348ddebb26e..41d58f8f2d6 100644 --- a/gnu/dist/toolchain/gcc/cccp.c +++ b/gnu/dist/toolchain/gcc/cccp.c @@ -8944,7 +8944,7 @@ macarg1 (start, limit, macro, depthptr, newlines, comments, rest_args) ++*newlines; break; case '/': - if (macro) + if (macro && !put_out_comments) break; if (bp[1] == '\\' && bp[2] == '\n') newline_fix (bp + 1); -- cgit