-
Notifications
You must be signed in to change notification settings - Fork 754
fix some bitfield size calculate bug #3215
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
base: main
Are you sure you want to change the base?
Conversation
Now, we can perceive non-starting bitfields and non-ending bitfields
r? @emilio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Generally it looks good but I suspect this is specific to 64-bit architectures? Or am I missing something? In any case some more comments would be good. Thanks
For 32bit structures compiled across platforms, align_of is not accurate whether it is set to 8 or 4.
add bitfield pack offset bug
fix and add #3104 case this change add depended clang report offset |
@emilio Can you take some time to review this PR ? |
Fixes #3238 |
Now, we can perceive non-starting bitfields and non-ending bitfields
Also, I modified the calculation method of align: only calculate alignment for bitfield from structure using
bitfield_width
The reason is that the code now no longer relies on
#[repr(C)]
to generate alignments, but always contains all bytesThe problem that is currently known is that the test case
bitfield-linux-32.hpp
was dropped#[repr(packed(4))]
. I don't know the reason, hope someone can help me