Skip to content

Omit structs and unions that would be empty.#613

Closed
sunfishcode wants to merge 3 commits intobytecodealliance:mainfrom
sunfishcode:sunfishcode/no-empties-in-c
Closed

Omit structs and unions that would be empty.#613
sunfishcode wants to merge 3 commits intobytecodealliance:mainfrom
sunfishcode:sunfishcode/no-empties-in-c

Conversation

@sunfishcode
Copy link
Member

Empty structs and unions are a non-standard extension in C, and have a different layout between C and C++, so avoid emitting them. If a generated struct or union would have zero members, avoid emitting it.

Empty structs and unions are a non-standard extension in C, and have a
different layout between C and C++, so avoid emitting them. If a generated
struct or union would have zero members, avoid emitting it.
@sunfishcode sunfishcode force-pushed the sunfishcode/no-empties-in-c branch from 63fd0e5 to f56840f Compare July 13, 2023 00:46
@sunfishcode sunfishcode force-pushed the sunfishcode/no-empties-in-c branch from f56840f to 865e1ab Compare July 13, 2023 02:25
@alexcrichton
Copy link
Member

I believe this is resolved by WebAssembly/component-model#218, so closing

@sunfishcode sunfishcode deleted the sunfishcode/no-empties-in-c branch August 7, 2023 18:19
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.

2 participants