I have some C code and using the GCC compiler.
The code has some nested types inside an anonymous union:
struct ab {
int a;
int b;
union {
int *c;
int *d;
struct f {
int *c;
int *d;
};
struct e {
int *c;
int *d;
};
};
};
I am getting this error:
Error: 'struct ab::<anonymous union>::f' invalid; an anonymous union
can only have non-static data members.
Can someone give further explanation why this error is happening?