Skip to content

Conversation

thonkinator
Copy link

Uses the same logic as demoting structs with bitfields. I also noticed that Translator.alignmentForField panics when given a bitfield, which could be replicated for opaque fields, but I figured the repeated call to Translator.typeWasDemotedToOpaque was not preferable.

Fixes ziglang/translate-c#182

@alexrp
Copy link
Member

alexrp commented Sep 29, 2025

https://github.com/ziglang/translate-c is the canonical repository for translate-c, please submit this PR there.

@alexrp alexrp closed this Sep 29, 2025
@thonkinator
Copy link
Author

@alexrp that repository doesn't seem to be used for the zig compiler, does that mean that there is no way to contribute to the translate-c that is actually used in the compiler? i've seen other accepted pull requests to this repository fixing issues on that one

@alexrp
Copy link
Member

alexrp commented Sep 29, 2025

We will be periodically synchronizing https://github.com/ziglang/translate-c into this repository, at least until #20630 happens.

The PRs you've seen were probably from before #24497. After that PR, the only translate-c code that's maintained in this repository is glue code; the core translation logic is maintained in https://github.com/ziglang/translate-c.

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.

translate-c should demote structs with opaque fields to opaque types

2 participants