aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeddy <[email protected]>2014-05-01 14:03:12 +0800
committerTeddy <[email protected]>2014-05-01 14:03:12 +0800
commit624acc18eff51100116c4af09cab9fdbd51f54e6 (patch)
tree8682235b36c9051565b0b06a60d9f7cf2a262698
parent2b30bf74245fa28d59491150395b54766783b379 (diff)
...
-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)