I recently noticed (I'm new to the language) that when using a union
type as a component of a structure, you don't need a union-tag.
struct foo
{
char *ptr;
union
{
int i;
float f;
char c;
};
};
I have never read that a union type reference is optional in any
case.
Is this specific to the compiler, or part of the standard?
type as a component of a structure, you don't need a union-tag.
struct foo
{
char *ptr;
union
{
int i;
float f;
char c;
};
};
I have never read that a union type reference is optional in any
case.
Is this specific to the compiler, or part of the standard?
Comment