Due to server problems the website is temporarily offline! Visit http://www.smorgasbordet.com/pellesc/ to download Pelles C.
include <stdio.h>typedef struct t_test { int a; union { int b; struct { int c; int d; }; struct { int e; int f; }; int g; };} T_TEST;int main(void){T_TEST t; t.a = 1; t.b = 2; t.c = 3; t.d = 4; t.e = 5; t.f = 6; t.g = 7; printf("%d %d %d %d %d %d %d sz %d\n", t.a, t.b, t.c, t.d, t.e, t.f, t.g,sizeof(t));getchar();}
Yes - the snippet is non-standard in every way, but if you enable Microsoft extension (the /Ze compiler option) you should get what you want...