scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 82c920e97007a784ca620fdaead55d4ce8bc0ecf
parent 55c925535846f926611e070fe5bd417dc9ac326c
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 23 Dec 2016 08:57:01 +0100

[cc1] Fix popctx()

Last commit changed the order of the operations (first decrement
curctx and then kill symbols), so it was necessary to change
the condition of the loop over head elements.

Diffstat:
Mcc1/symbol.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cc1/symbol.c b/cc1/symbol.c @@ -106,7 +106,7 @@ popctx(void) { Symbol *next, *sym; - for (sym = head; sym && sym->ctx > curctx; sym = next) { + for (sym = head; sym && sym->ctx == curctx; sym = next) { next = sym->next; killsym(sym); }