scc

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

commit 00612b9bd60706d7e77d3bbc165aa13e2a91556d
parent 1220f2d67439a31cff760ae7d97818a8f84fec87
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 13 Mar 2015 10:08:39 +0000

Remove unneded variable in move()

This variable was used only once for getting a subfield,
so it was better to use the base type instead.

Diffstat:
Mcc2/cgen.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cc2/cgen.c b/cc2/cgen.c @@ -50,7 +50,6 @@ allocreg(Node *np) static void move(Node *np) { - Type *tp = &np->type; Symbol *sym; char reg; @@ -59,7 +58,7 @@ move(Node *np) switch (np->op) { case AUTO: sym = np->u.sym; - switch (tp->size) { + switch (np->type.size) { case 1: code(LDFX, reg, IX, sym->u.v.off); break;