Skip to content

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
@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.

3 participants