scc

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

commit 8b3404606cd8120322ef7816442a7fb938e7b513
parent dd2b510053f9b9bfd2eb4f249d493b5f42c3c489
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Mon, 16 Feb 2026 11:24:54 +0100

cc1: Mark cpp else blocks

Once we find a #else then no more #else or #elif can happen
in the current preprocessor conditional context and we have
to mark it to be able to detect this condition.

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

diff --git a/src/cmd/scc-cc/cc1/cpp.c b/src/cmd/scc-cc/cc1/cpp.c @@ -966,6 +966,7 @@ cppelse(void) ifstate[cppctx-1].enabled = 1; cppoff = 0; } + ifstate[cppctx-1].iselse = 1; next(); }