blob: cba75efdfd9bc7536dd7cdcab2ce670aff01699f [file] [log] [blame]
/* Attempt to use an integer as a pointer
in a union. */
#include <string.h>
typedef union
{
char *string;
int amt;
} bad_union;
void process(bad_union *u)
{
strcpy(u->string, "string");
}
int main()
{
bad_union b;
b.amt = 100;
process(&b);
return 0;
}