Is it possible to test those structures between compilers with some code like this ?
#include <stddef.h>
#include <stdio.h>
struct foo {
char a;
short b;
long c;
int d;
};
int main(void)
{
int a, b, c, d;
a = offsetof(struct foo, a);
b = offsetof(struct foo, b);
c = offsetof(struct foo, c);
d = offsetof(struct foo, d);
printf("%d\n%d %d %d %d\n", sizeof(struct foo), a, b, c, d);
return 0;
}