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

Translate struct/union/array initializers and improve zero values #9

Merged
merged 3 commits into from
Feb 11, 2025

Conversation

sno2
Copy link
Contributor

@sno2 sno2 commented Feb 10, 2025

The test/cases/translate/struct_in_struct_init_to_zero.c test had an unused PTR macro, so I moved it to a separate test to stop it from blocking a union initializer test.

Struct initialization with named and anonymous values is affected by an upstream bug in arocc: Vexu/arocc#842. This is the only thing stopping test/cases/translate/struct_initializer_-_simple.c from passing.

@sno2 sno2 force-pushed the struct-union-array-init branch from 785a637 to d1de6a6 Compare February 11, 2025 03:41
Copy link
Member

@Vexu Vexu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small tweaks needed but overall looks good!

@sno2 sno2 force-pushed the struct-union-array-init branch from d1de6a6 to 2645469 Compare February 11, 2025 16:37
@sno2
Copy link
Contributor Author

sno2 commented Feb 11, 2025

Seems like the build is failing from a std.Build breakage. I'll investigate.

@sno2
Copy link
Contributor Author

sno2 commented Feb 11, 2025

There is a PR open in the arocc repo to fix this: Vexu/arocc#843

@sno2 sno2 changed the title Translate struct, union, and array initializers Translate struct/union/array initializers and improve zero values Feb 11, 2025
@sno2
Copy link
Contributor Author

sno2 commented Feb 11, 2025

I'll also include the arocc update in this if you don't mind.

@Vexu Vexu merged commit 088d2ca into ziglang:main Feb 11, 2025
3 checks passed
@Vexu
Copy link
Member

Vexu commented Feb 11, 2025

Thanks!

@sno2 sno2 deleted the struct-union-array-init branch February 11, 2025 18:31
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