Something like code below valid?
struct foo {
int a;
int b[];
};
struct bar {
int c;
struct foo d;
};
struct bar *x = malloc(sizeof(struct bar) + sizeof(int [128]));
It seems good to me, but I'm a little skeptical that the compiler does not complain if I do this:
struct bar {
struct foo d;
int c;
};
source
share