scc

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

commit 8d3968bf9dfc2e322b7fd940628821c27ecfc87f
parent 25ccf1063d16c4dbab29c64c4513df8dae74073b
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 29 Sep 2017 21:45:21 +0200

[as] Remove the use of cursec in the symbol definition

We don't know where the symbol is going to be used, and maybe the
symbol is a register and if we do this or then we destroy the
value that we wanted to put.

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

diff --git a/as/symbol.c b/as/symbol.c @@ -91,7 +91,7 @@ lookup(char *name, int type) sym = xmalloc(sizeof(*sym)); sym->name = xstrdup(name); - sym->flags = (cursec->flags & TMASK) | FLOCAL | FUNDEF | type; + sym->flags = FLOCAL | FUNDEF | type; sym->desc = 0; sym->value = 0; sym->next = *list;