I've read that anonymous structs are a compiler extension and codeblocks allows them as long as -pedantic-errors are not enabled.
My question is, since it is not legal in C++, what would be the legal equivalent of:
typedef union XYZ
{
int Color;
struct
{
BYTE X, Y, Z;
};
} *XYZ;
See if I name the struct i'd have to access it using it's name/object. If I switch the struct and the union, then the layout is completely different and as such changing one affects the other.
Also would #Pragma pack affect it?