1 union u { 2 int i; 3 char x[8]; 4 }; 5 foo(int a)6static union u foo(int a) 7 { 8 return (union u)a; 9 } 10 bar(long a)11static union u bar(long a) 12 { 13 return (union u)a; 14 } 15 16 /* 17 * check-name: union-cast 18 * check-command: sparse -Wunion-cast $file 19 * 20 * check-error-start 21 eval/union-cast.c:8:17: warning: cast to union type 22 eval/union-cast.c:13:17: warning: cast to non-scalar 23 * check-error-end 24 */ 25