union { member-specification } ;is called an anonymous union; it defines an unnamed type and an unnamed object of that type called an anonymous union object.
void f() { union { int aa; char* p; } obj, *ptr = &obj; aa = 1; // error ptr->aa = 1; // OK }
union U { int x = 0; union { int k; }; union { int z; int y = 1; // error: initialization for second variant member of U }; };— end example