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
When running bindgen with the --explicit-padding option on the following file:
bindgen
--explicit-padding
#include <stdint.h> struct Foo { union { struct { uint64_t d1; uint64_t d2[1]; }; uint64_t d3; uint8_t d4[0]; }; };
it ends up generating the following struct:
#[repr(C)] pub struct Foo__bindgen_ty_1 { pub __bindgen_anon_1: __BindgenUnionField<Foo__bindgen_ty_1__bindgen_ty_1>, pub d3: __BindgenUnionField<u64>, pub d4: __BindgenUnionField<[u8; 0usize]>, pub __bindgen_padding_0: [u8; 18446744073709551608usize], pub bindgen_union_field: [u64; 2usize], }
The __bindgen_padding_0 field is a little bit extreme.
__bindgen_padding_0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When running
bindgen
with the--explicit-padding
option on the following file:it ends up generating the following struct:
The
__bindgen_padding_0
field is a little bit extreme.The text was updated successfully, but these errors were encountered: