-
Notifications
You must be signed in to change notification settings - Fork 717
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
Bindgen >=0.58 produces an invalid union with both packed and align representation hints #2159
Comments
I suspect the change introduced by #1984 relates here as it removed |
I'm running into this error on bindgen 0.64.0. How do I work around this issue? |
I don't remember well, but, in my case, the workaround was to remove |
I am stuck on this issue as well with bindgen version 0.66.1. I have a union that contains the #pragma pack(push, 1)
typedef union
{
unsigned __int128 m;
} u;
#pragma pack(pop) produces the following error:
Without the pack pragma only Edit, for completeness sake: with pack: #[repr(C, packed)]
#[repr(align(1))]
#[derive(Copy, Clone)]
pub union u {
pub m: u128,
} without pack: #[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub union u {
pub m: u128,
} |
I tried to bump the version, but found this error on Windows with cross-compilation.
Input C/C++ Header
or
Bindgen Invocation
Actual Results
The diff between bindgen 0.57 and 0.58:
Expected Results
The text was updated successfully, but these errors were encountered: