scc

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

commit 3fe369d20c2ac3e00272ce3e9fded43f3d9a5afc
parent b3a6d0e78452e23b9d2044454aec454d39631263
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri,  8 Jan 2016 12:18:11 +0100

Initialize type flags

When a new type is created all the flags of the new type
must be initialized, in other case we can have wrong tests.

Diffstat:
Mcc1/types.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/cc1/types.c b/cc1/types.c @@ -446,7 +446,10 @@ mktype(Type *tp, int op, TINT nelem, Type *pars[]) type.type = tp; type.op = op; + type.arith = 0; + type.integer = 0; type.printed = 0; + type.aggreg = 0; type.letter = c; type.p.pars = pars; type.n.elem = nelem;