We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Also followup from #739.
The following code:
union Foo { unsigned int bitfield: 1; };
Will generate, with the stable rust option:
#[repr(C)] #[derive(Debug, Copy)] pub struct Foo { pub _bitfield_1: u8, pub bindgen_union_field: u32, }
And with the unstable one:
pub union Foo { pub _bitfield_1: u8, }
We don't have a special path for bitfields in unions, and we should force their offset to be at offset zero, and force alignment and all that.
It's presumably not ultra-hard to fix.
The text was updated successfully, but these errors were encountered:
Auto merge of #1066 - pepyakin:bitfields-in-unions, r=fitzgen
5dbdadc
Bitfields in unions Fixes #744 I think it is WIP for the moment as I didn't run tests locally.
No branches or pull requests
Also followup from #739.
The following code:
Will generate, with the stable rust option:
And with the unstable one:
We don't have a special path for bitfields in unions, and we should force their offset to be at offset zero, and force alignment and all that.
It's presumably not ultra-hard to fix.
The text was updated successfully, but these errors were encountered: