3 ms·
Bitfields are too useful of a feature not to use. The solution is simple: add a unit test to verify that setting one bitfield to all 1's will result in the over
by eecsninja 8y ago
Bitfields are too useful of a feature not to use. The solution is simple: add a unit test to verify that setting one bitfield to all 1's will result in the overall 32-bit or 64-bit word having the expected value.
Add a comment explaining this too.
That will catch nonportable use in the future.