| ▲ | tremon 2 hours ago | |
But doesn't that show why this is a bad idea? If I understand correctly, this code:
...will now succeed or fail depending on the endianness of the target. That looks like the type of footgun that will bring decades of joy. | ||
| ▲ | peesem an hour ago | parent | next [-] | |
zig does not allow arrays in packed structs/unions specifically for endianness reasons (there may be other reasons as well but endianness is what i know of) | ||
| ▲ | AlienRobot an hour ago | parent | prev [-] | |
I wonder if packed union also got/will get the same "logical bits" treatment? | ||