diff options
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2380,7 +2380,9 @@ static Node *new_add(Node *lhs, Node *rhs, Token *tok) { } // ptr + num - rhs = new_binary(ND_MUL, rhs, new_long(lhs->ty->base->size, tok), tok); + Node *base_size = new_long(lhs->ty->base->size, tok); + base_size->is_sizeof = lhs->ty->base; + rhs = new_binary(ND_MUL, rhs, base_size, tok); return new_binary(ND_ADD, lhs, rhs, tok); } |