commit bc25f140c1c9d2c51f81e3d767dcc8ae532d662c
parent 23d3a6d3c2d03f9de9f586306ccda0132ecc0f2d
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Tue, 22 Mar 2022 11:19:37 +0100
cc1: Revert commit 7d04db92
Macro parameters must be expanded when they are substitued and
not when they are detected. At this moment we don't have a way
to hide symbols if we expand them in copypars(), so for this
reason is better to mark as TODO the tests that stop working
after this change.
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/cmd/cc/cc1/cpp.c b/src/cmd/cc/cc1/cpp.c
@@ -148,6 +148,7 @@ parsepars(struct macroctx *mp)
if (ahead() != '(' && mp->npars > 0)
return 0;
+ disexpand = 1;
next();
n = 0;
if (ahead() == ')') {
diff --git a/tests/cc/execute/scc-tests.lst b/tests/cc/execute/scc-tests.lst
@@ -142,7 +142,7 @@
0149-define.c
0150-define.c
0151-vararg.c [TODO]
-0152-cat.c
+0152-cat.c [TODO]
0153-cpp-string.c
0154-if-defined.c
0155-struct-compl.c [TODO]
@@ -171,7 +171,7 @@
0178-include.c
0179-sizeof.c [TODO]
0180-incomplete.c
-0181-stringize.c
+0181-stringize.c [TODO]
0182-voidcast.c
0183-negenum.c
0184-esc-macro.c