#include typedef struct { #if 1 union { struct { void *x; void *y; }; struct { void *a; int b; }; }; #else union { void *x; void *a; }; union { void *y; int b; }; #endif } test; int main(int argc,char **argv) { test v = {0}; v.a = (void *) 5; int *m = (int *) &v; printf("%d %d\n",m[0],m[1]); printf("%d %d\n",(int) v.x,(int) v.y); return 0; }