Quote:
not the 6 one might otherwise expect.

And if you need sizeof(struct foo_t) to be 6, this is the only way to write a working f():
Code:
int f(struct foo_t *ft)
{
int i;
memcpy(&i, &(ft->x), sizeof(int));
return i;
}



Peter