Skip to content
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

fix Issue 21969 - importC: Error: bit fields are not supported #13033

Merged
merged 1 commit into from Aug 30, 2021

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Aug 30, 2021

Issue was closed by #13031 and #13027, but after adding some more tests, found a problem with the implementation where fieldState.offset is not adjusted after the initial call to startNewField, even though more bit-fields were added.

This meant that in the second call to startNewField (see test A9 or A10), the nextoffset value was wrong.

Values for MS Bitfields are pulled from godbolt, I've no idea if the MS path is correct in DMD: https://godbolt.org/z/6G4aWG8eG

I also have no idea what DM Bitfields do for the added tests, maybe @WalterBright can fill in those gaps.

@ibuclaw ibuclaw added Bug Fix ImportC Pertaining to ImportC support labels Aug 30, 2021
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Auto-close Bugzilla Severity Description
21969 major importC: Error: bit fields are not supported

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#13033"

@dlang-bot dlang-bot merged commit e60ce76 into dlang:master Aug 30, 2021
@ibuclaw ibuclaw deleted the issue21969 branch August 31, 2021 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Bug Fix ImportC Pertaining to ImportC support
Projects
None yet
3 participants