These questions cannot be answered without further clarification. The question is marked with C ++, which means that the language is supposedly C ++.
In this case, if the declarations are made in the namespace area, the ix declaration is invalid. It is not allowed to use an unnamed class type (which does not have a binding) to declare an object with external connection. ix ad will work in local area
void foo() { struct { int x; } ix;
It may also work if ix was declared internally in the namespace
static struct { int x; } ix;
although I personally think that this should also have been poorly formed (Como somehow allows this).
But the external namespace declaration is poorly formed
So, if the scope of the namespace is assumed, and if the above declarations should be considered as a single code, then there are no meaningful answers to these questions. All code is simply invalid. It's pointless. This is not C ++.
Otherwise, if ix declared without binding (local) or internally, then ix is an object.
As for ia , it is an object, regardless of where it is declared, since the class type is named.
Note that the concept of an object in C ++ has nothing to do with classes. An object in C ++ is a region of memory (memory). For example, a variable of type int is an object in C ++.
Added later: A little about the legitimacy of the ix declaration - an interesting problem. Apparently, C ++ 98 allowed such declarations that were outlawed in DR # 132 . However, later the offer was rejected (for a rather strange reason), and everything remained as it is. However, Comeau Online refuses to accept an object declaration with an external connection with an unnamed type (internal communication is OK). Perhaps this could be a formal mistake in the Como compiler (not that I complained about it).
Added even later: Oh, I see that there is still a later DR # 389 , which finally prohibits such ads, but the status of this DR is still CD1.