commit b08abffa5c4d301dbb5b568fa3543cade0671afd
parent a5ba225d7f8b59301709e4e22410a6c218006665
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Mon, 13 Feb 2023 13:27:18 +0100
cc1: Add more debug information for macro expansion
Knowing when the stringize and concatenate operators are applied
help to debug some problems.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/cmd/cc/cc1/cpp.c b/src/cmd/cc/cc1/cpp.c
@@ -251,6 +251,7 @@ copymacro(Macro *mp)
break;
case CONCAT:
/* token concatenation operator */
+ DBG("MACRO concat");
while (bp[-1] == ' ')
--bp, ++bufsiz;
while (s[1] == ' ')
@@ -258,6 +259,7 @@ copymacro(Macro *mp)
break;
case STRINGIZE:
/* stringfier operator */
+ DBG("MACRO stringize");
arg = mp->arglist[atoi(s += 2)];
s += 2;