Old version:
struct inner {
int bar;
}
struct foo {
struct inner i;
};
void quux(struct foo *p);
A new version:
struct inner2 {
int bar;
};
struct foo {
struct inner2 i;
};
void quux(struct foo *p);
Broken code:
struct foo x;
struct inner *i = &x.i;
i->bar = 42;
quux(&x);
Since the only difference is the name of the structure, and the name of the internal type structure is erased at compile time, there is no binary incompatibility.
source
share