scc

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

commit 8f9b01e50962ab00b65267732fac13960e312cc1
parent e83f4e7c1597b0647aab5d8bd05cf8ef25a32e24
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed, 27 May 2015 15:16:34 +0200

Create symbols in nextsym as undeclared

newsym() returns declared symbols (mainly because
they are needed for tags), but when nextsym is used
the returned sym must be an unitialized symbol.

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

diff --git a/cc1/symbol.c b/cc1/symbol.c @@ -152,6 +152,7 @@ nextsym(Symbol *sym, unsigned ns) return sym; } new = newsym(ns); + new->flags &= ~ISDEFINED; new->name = xstrdup(yytext); new->hash = sym->hash; return sym->hash = new;