resym
resym copied to clipboard
Bitflag members are incorrectly identified as an unnamed union
When you have more than one bitflag members, they are incorrectly identified as an unnamed union. For example:
struct bitflags {
bool flag1 : 1;
bool flag2 : 1;
bool flag3 : 1;
bool flag4 : 1;
bool flag5 : 1;
bool flag6 : 1;
bool flag7 : 1;
bool flag8 : 1;
};
Is identified as:
struct bitflags {
union {
bool flag1 : 1;
bool flag2 : 1;
bool flag3 : 1;
bool flag4 : 1;
bool flag5 : 1;
bool flag6 : 1;
bool flag7 : 1;
bool flag8 : 1;
};
};
Hi! Yes indeed, thanks for creating an issue to track this as I forgot to do it! Bitfields are actually always put inside of a union at the moment (no need to have 8 members). I haven't taken the time to fix this as it shouldn't produce incorrect layouts.
But yes, ideally this should not happen.
Yeah I only checked with this one scenario but that would make sense given the implementation. I've updated the issue to reflect.
The issue should now be fixed on master!