scc

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

commit ea128fec0a7ee10a849cab1876ce1641ffc1f340
parent 0f4a8d6d730ce5965cd8fab915e816a3fdaa8759
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 20 Jan 2017 10:00:44 +0100

[cc2-qbe] Initialize children pointers in tmpnode()

Not always them were initialized, mainly when it received
a pointer to some already allocated node.

Diffstat:
Mcc2/arch/qbe/cgen.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c @@ -105,6 +105,7 @@ tmpnode(Node *np, Type *tp) sym = getsym(TMPSYM); sym->type = np->type = *tp; sym->kind = STMP; + np->left = np->right = NULL; np->u.sym = sym; np->op = OTMP; np->flags |= ISTMP;