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.
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:
since the field
y
could be packed into the 16 bit field that containsx
, buty
has a different type thanx
. Now, it is accepted.Thanks to @Smfakhoury for finding these issues.