[hackers] [scc] [cc2] Set correct values in array types || Roberto E. Vargas Caballero
commit 3e1b1c0c4e889523604b9ecf286bb352cf2b3bc6
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Mon Jan 25 21:03:52 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Mon Jan 25 21:03:52 2016 +0100
[cc2] Set correct values in array types
Size and alignment were not set in array types, and the
node was not freed.
diff --git a/cc2/parser.c b/cc2/parser.c
index d700269..ac9a3e5 100644
--- a/cc2/parser.c
+++ b/cc2/parser.c
_AT_@ -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
Received on Tue Jan 26 2016 - 10:57:43 CET
This archive was generated by hypermail 2.3.0
: Tue Jan 26 2016 - 11:00:38 CET