1 union u { 2 unsigned char a; 3 double b; 4 }; 5 6 int a; 7 foo(void)8 union u foo (void) 9 { 10 union u b; 11 12 if (a) 13 b.a = 1; 14 else 15 b.a = 0; 16 return b; 17 } 18