scc

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

commit 5e1de781e494bc498563179f42fa19355816b29b
parent ebcda96d082604b10e93af543fd719ed037f4746
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Thu, 21 May 2026 11:12:36 +0200

cc1: Fix cpp parameter space strimming

The trailing white spaces where not removed because we were always
checking the ending \0 instead of the last character of the string.

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

diff --git a/src/cmd/scc-cc/cc1/cpp.c b/src/cmd/scc-cc/cc1/cpp.c @@ -172,7 +172,7 @@ parameter(Macro *mp, int n) while (begin < end && isspace(*begin)) begin++; - while (end > begin && isspace(*end)) + while (end > begin && isspace(end[-1])) end--; siz = end - begin;