-
Notifications
You must be signed in to change notification settings - Fork 4
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
Bitwise portable issue #6
Comments
It seems to be implementation-defined by the C standard although I believe it's consistent across the major compilers that support packed bitfields, I can do some tests for that. For little-endian machines a difference does need to be made (http://mjfrazer.org/mjfrazer/bitfields/), however that is also needed when using bit-wise operators (if the deltas are transferred across platforms). |
OSX:
To test:
|
I look forward to seeing your test results |
I've completed testing, with some minor changes it does work across all compilers listed above (check the msvc gobolt link for the final code). I'll create a pull request later |
I found a stackoverflow post saying that the bitfield is not portable. The only portable code is using bit-wise operators.
So should we change to bit-wise operators?
@i404788
The text was updated successfully, but these errors were encountered: