aboutsummaryrefslogtreecommitdiff
path: root/semantics.c
diff options
context:
space:
mode:
Diffstat (limited to 'semantics.c')
-rw-r--r--semantics.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/semantics.c b/semantics.c
index 1361dd6..50eb924 100644
--- a/semantics.c
+++ b/semantics.c
@@ -1870,10 +1870,14 @@ void semantics_check(CNode *p) {
size = 0;
for (p = func->rec.func.params; p; p = p->next)
{
+ CType_t t = p->type;
/* force to a word alignment */
size += align_shift(size);
p->start = size;
- size += calc_size(p->type);
+ if (t->type == CARR)
+ size += PTR_SIZE;
+ else
+ size += calc_size(t);
}
size = 0;
for (p = func->rec.func.local; p; p = p->next)