-
Notifications
You must be signed in to change notification settings - Fork 671
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
Struct not packed when pragma pack is used #2067
Comments
emilio
added a commit
that referenced
this issue
Jun 21, 2021
emilio
added a commit
that referenced
this issue
Jun 21, 2021
I put up a fix here: #2068. The issue is basically this one, which only looks at the packed attribute: Lines 1631 to 1633 in b60339e
|
Thank you! This indeed solved the issue. |
LoganBarnett
pushed a commit
to LoganBarnett/rust-bindgen
that referenced
this issue
Dec 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Input C/C++ Header
Bindgen Invocation
Actual Results
and/or
Expected Results
I expect a Rust struct with a bitfield of size 4 (
[u8; 4usize]
) instead of 5, with correct accessors for all fields. It is worth noting that using__attribute__((packed))
over#pragma pack(push, 1)
does yield the correct results (and passing tests).The text was updated successfully, but these errors were encountered: