packed struct can not handle arbitrary bit-width integers (more than 16 bit) correctly #5451
Comments
|
This is a known bug, I believe, though I do not remember the exact issue off-hand. If you search for "packed," you'll notice a number of bugs :( |
|
I couldn't find this bug I searched before. |
|
My workaround is now to use
insteadof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
zig version 0.6.0+e1186c88e
Now play with the size of reserved2.
reserved2: u1..u16: Compiler and sizeOf output ok.
reserved2: u17..u23: strange compiler output and sizeOf(Can.CR) should be 4 bytes.
reserved2: u24: compiler crashes
reserved2: u25:Compiler and sizeOf output ok.
The text was updated successfully, but these errors were encountered: