-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix compile error on the std.c.EXC.MASK field on darwin
#21273
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
Conversation
std.c.EXC.MASK field on darwinstd.c.EXC.MASK field on darwin
I would use Reference: https://github.com/apple-oss-distributions/xnu/blob/main/osfmk/mach/exception_types.h#L207 |
In that case, why not use |
|
|
|
Interesting. I wonder why that decision was taken. |
Turns out this was already fixed in ziglang#21964. I have no idea why GitHub showed an incorrect diff in ziglang#21273, or how applying the diff to master was even possible, but here we are.
The backing integer for the
MASKstruct is au32, but the bool fields sum up to au13.I've added 19 bits of padding.
Alternatively, we could add3bits of padding and make it au16backed packed struct?EDIT: Looks using
std.c.darwing.exception_mask_twould be a better idea here.Is there a reason why the std library doesn't use C types in these places?
Reference: #21094
P.S: Should we consider having a
testblock for this just to see if it compiles? Something like: