scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit f2553ae4bbaeabd5c6ecee8d2b0aa1c7e1f3f16f
parent 5e1de781e494bc498563179f42fa19355816b29b
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Fri, 22 May 2026 10:49:53 +0200

cc1: Accept spaces after stringize operator

Spaces after # operator in macro definitions must be ignored.

Diffstat:
Msrc/cmd/scc-cc/cc1/cpp.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/cmd/scc-cc/cc1/cpp.c b/src/cmd/scc-cc/cc1/cpp.c @@ -585,6 +585,8 @@ getdefs(Symbol *args[NR_MACROARG], int nargs, char *buffer, size_t bufsiz) ++input->p; } else { c = token = STRINGIZE; + while (isspace(input->p[1])) + ++input->p; } } else if (c == '"' || c == '\'' || c == '_' || isalpha(c)) { next();