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