Merged
Conversation
packed union fields must all have matching bit sizes
Contributor
|
dont the (planned?) semantics of packed structs mean any undefined bits cause the entire thing to be undefined? probably shouldnt recommend doing that in an upgrade guide |
Member
Author
|
Good call, thank you. |
Member
Author
should I disable the test for stage2_aarch64 for now? |
Contributor
|
Weren't explicit packed union backing ints part of #19754? That's still a compile error after this patch |
Member
Author
|
Sounds like #24715 to me |
Contributor
|
I thought that's just about making the tag mandatory, I was referring to this comment const U = packed union(u16) {
x: packed struct(u16) {
data: u8,
padding: u8 = 0,
},
y: u16,
};
comptime {
_ = U;
}still doesn't compile with: |
Member
Author
|
Sorry, you're right. There is not a proposal open which is limited to supporting backing integer type for packed unions, although several proposals imply its existence. I'll add that right now. |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #19754
Upgrade Guide
⬇️