I have the following code:
int main(void)
{
struct { int x; } a, b;
struct { int x; } c;
struct { int x; } *p;
b = a; /* OK */
c = a;
Interestingly Clang gives the following:
error: incompatible type assigning 'struct ', expected 'struct '
warning: incompatible pointer types assigning 'struct *', expected 'struct *'
It seems that if two (or more) anonymous structs are declared then the compiler does some internal magic which specifies which specific anonymous struct is being referred too.