Q:

Where could I use struct compatibility?

I was reading about type promotion in C on this page and found something more about struct/union/enum:

6.12.2 Separate Compilation Compatibility
Since each compilation probably looks at different source files, most
  of the rules for compatible types across separate compiles are
  structural in nature:
Matching scalar (integral, floating, and pointer) types must be
  compatible, as if they were in the same source file.
Matching structures, unions, and enums must have the same number of
  members. Each matching member must have a compatible type (in the
  separate compilation sense), including bit-field widths.
Matching structures must have the members in the same order. The order
  of union and enum members does not matter.
Matching enum members must have the same value.
An additional requirement is that the names of members, including the
  lack of names for unnamed members, match for structures, unions, and
  enums, but not necessarily their respective tags.

My question: In which sense are struct "equals"? where and why could one use this? could someone give also a code example?
obviously the below code doesn't compile with no warnings without a cast. And since C isn't a strongly-typed language it might work with any kind of struct. So I don't really see where it may be useful;
struct foo_t
{
    int a;
    int b;
};

struct baa_t
{
    int a;
    int b;
};

void print(struct foo_t*);

int main(void)
{
    struct foo_t a = {1,2};
    struct baa_t b = {3,4};

    print(&a);
    print(&b); //cast needed
    return 0;   
}

void print(struct foo_t *f)
{
    printf("a = %d\r\n", f->a);
    printf("b = %d\r\n", f->b);
}

A:

This mostly pertains to having multiple .cpp files reference the same header file and use a struct of it (or worse, both independently define it).
Each .cpp file will be compiled in a completely separate, independent process and neither knows anything about the other (ignoring LTCG), but they will both handle the struct in the same way so a struct used in one .cpp file will have the exact same layout as in another one.
The same applies to a struct inside a struct - one .cpp file might have a struct that contains another one, and another .cpp might only be exposed to a pointer to the inner struct with no knowledge of what's around it. Still, the other .cpp will need to be able to operate on it, so the actual layout of the data members needs to match exactly.

