I am getting a warning for the below code if i declare this anonymous union.
Its telling that no instance or variable has been created.
If i create a variable for this union definition its working fine.
Is it that anonymous union cant be used in Objective C.
@implementation rs
union{
int a[10];
};
@end
It’s the same as in C. If you compile a C program with an anonymous union like the one you’ve posted, you also get a warning.