aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index c7ca3dce..6db70f1a 100644
--- a/parse.c
+++ b/parse.c
@@ -1717,7 +1717,12 @@ static struct token *abstract_array_declarator(struct token *token, struct symbo
has_static |= (sym->op->type & KW_STATIC);
token = token->next;
}
- token = assignment_expression(token, &expr);
+ if (match_op(token, '*') && match_op(token->next, ']')) {
+ // FIXME: '[*]' is treated like '[]'
+ token = token->next;
+ } else {
+ token = assignment_expression(token, &expr);
+ }
sym->array_size = expr;
return token;
}