Skip to content
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

Two bug fixes #109

Merged
merged 2 commits into from
Nov 9, 2023
Merged

Two bug fixes #109

merged 2 commits into from
Nov 9, 2023

Conversation

nikswamy
Copy link
Contributor

@nikswamy nikswamy commented Nov 8, 2023

  • Forbid refinements and bitwidths on non-scalar fields

  • A bit field ends with the type of the underlying field changes. Previously 3D would reject this:

//bitfield boundaries coincide with the the types of their underlying fields
typedef struct _BFBoundary {
   UINT16 x : 12; //4 bits of padding here are implicit
   UINT8 y : 4;
   UINT8 z : 3; //y and z are packed, but with 1 bit of padding left
   UINT16 w : 12; //4 bits of padding here are implicit
} BFBoundary;

since the field y could be packed into the 16 bit field that contains x, but y has a different type than x. Now, it is accepted.

Thanks to @Smfakhoury for finding these issues.

@tahina-pro tahina-pro merged commit 01760c8 into master Nov 9, 2023
5 checks passed
@tahina-pro tahina-pro deleted the nik_misc branch October 25, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants