Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1960,6 +1960,7 @@ static Type *read_declarator(char **rname, Type *basety, Vector *params, int ctx
// Here, we pass a dummy object to get "pointer to <something>" first,
// continue reading to get "function returning int", and then combine them.
Type *stub = make_stub_type();
*stub = *basety;
Type *t = read_declarator(rname, stub, params, ctx);
expect(')');
*stub = *read_declarator_tail(basety, params);
Expand Down
3 changes: 2 additions & 1 deletion test/decl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

static void t1() {
int a = 1;
expect(3, a + 2);
int ((b)) = 2;
expect(5, a + b + 2);
}

static void t2() {
Expand Down