Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSVC zero size types #404

Closed
Tracked by #387
TwoClocks opened this issue Oct 18, 2022 · 0 comments · Fixed by #406
Closed
Tracked by #387

MSVC zero size types #404

TwoClocks opened this issue Oct 18, 2022 · 0 comments · Fixed by #406
Labels
bug Something isn't working

Comments

@TwoClocks
Copy link
Contributor

compiler exploer says MSVC is ok w/ this

typedef int J[];

struct J_extra_alignment {
    char a;
    J b;
};
struct J_extra_alignment var83;

_Static_assert(sizeof(J) == 0, "");
_Static_assert(_Alignof(J) == 4, "");

AROCC says

❯ ./zig-out/bin/arocc --emulate=msvc test.c
./cur.c:7:26: error: variable has incomplete type 'struct J_extra_alignment'
struct J_extra_alignment var83;
                         ^
1 error generated.
@Vexu Vexu added the bug Something isn't working label Oct 18, 2022
ehaas added a commit to ehaas/arocc that referenced this issue Oct 22, 2022
Previously, creating a variable of a type that contains a FAM
errored due a record field having incomplete size.

Closes Vexu#404
ehaas added a commit to ehaas/arocc that referenced this issue Oct 22, 2022
Previously, creating a variable of a type that contains a FAM
errored due to a record field having incomplete size.

Closes Vexu#404
@Vexu Vexu closed this as completed in #406 Oct 22, 2022
Vexu pushed a commit that referenced this issue Oct 22, 2022
Previously, creating a variable of a type that contains a FAM
errored due to a record field having incomplete size.

Closes #404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants