scc

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

commit 3e1b1c0c4e889523604b9ecf286bb352cf2b3bc6
parent eea0139149e4b53947fc3ba850a0b3f4713f3837
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 25 Jan 2016 21:03:52 +0100

[cc2] Set correct values in array types

Size and alignment were not set in array types, and the
node was not freed.

Diffstat:
Mcc2/parser.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/cc2/parser.c b/cc2/parser.c @@ -356,11 +356,15 @@ static void array(void) { Type *tp, *base; - Node *np; + Node *size; - np = pop(); + size = pop(); base = pop(); tp = pop(); + tp->size = size->u.i; + tp->align = base->align; + + delnode(size); } static void