Excuse me for the title of this question, I will probably update the title once I have my answer.
I have this ancient code compiling and working with gcc 4.x:
struct S {
int a;
int b;
};
int main(void)
{
return (struct S){1,2}.a;
}
As you can see I cast the {1,2}
to struct S
to access the member a
. How is this feature called in the C language? Or what are the correct terms to apply for this construct?
Is this feature supported in any of the visual studio versions?