blob: 5bee9e0dc705163ffaf9796874e7648d6ff06f72 [file] [log] [blame]
union u {
int i;
char x[8];
};
static union u foo(int a)
{
return (union u)a;
}
static union u bar(long a)
{
return (union u)a;
}
/*
* check-name: union-cast
* check-command: sparse -Wunion-cast $file
*
* check-error-start
eval/union-cast.c:8:17: warning: cast to union type
eval/union-cast.c:13:17: warning: cast to non-scalar
* check-error-end
*/