Skip to content

Add support for empty structs (under a switch) - #1011

Open
dc-mak wants to merge 1 commit into
rems-project:masterfrom
dc-mak:empty-structs
Open

dc-mak wants to merge 1 commit into
rems-project:masterfrom
dc-mak:empty-structs

Conversation

@dc-mak

@dc-mak dc-mak commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

So GCC and Clang and the allocator are all I guess impl-defined, so doing different things.

17:18 ➜  cerberus git:(empty-structs) cerberus --nolibc --typecheck-core --exec --batch --switches empty_structs tests/ci/0342-empty_struct.c
Defined {value: "Specified(0)", stdout: "y1: ffffffffffd4, y2: ffffffffffd0, x: ffffffffffd0, y3: ffffffffffcc\n", stderr: "", blocked: "false"}
Time spent: 0.061306 seconds
17:19 ➜  cerberus git:(empty-structs) cerberus-vip --nolibc --typecheck-core --exec --batch --switches empty_structs tests/ci/0342-empty_struct.c
Defined {value: "Specified(0)", stdout: "y1: ffffffffffd4, y2: ffffffffffd0, x: ffffffffffd0, y3: ffffffffffcc\n", stderr: "", blocked: "false"}
Time spent: 0.084719 seconds
17:19 ➜  cerberus git:(empty-structs) gcc --version && gcc tests/ci/0342-empty_struct.c && ./a.out
gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0
...
y1: 7ffcbdf304ec, y2: 7ffcbdf304f0, x: 7ffcbdf304eb, y3: 7ffcbdf304f4
17:19 ➜  cerberus git:(empty-structs) clang-15 --version && clang-15 tests/ci/0342-empty_struct.c && ./a.out
Ubuntu clang version 15.0.7
...
y1: 7ffc74254748, y2: 7ffc74254740, x: 7ffc74254738, y3: 7ffc74254730

@dc-mak
dc-mak requested a review from kmemarian as a code owner September 1, 2026 16:14

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant