Clarification on an example of unions in C11 standard
问题 The following example is given in the C11 standard, 6.5.2.3 The following is not a valid fragment (because the union type is not visible within function f): struct t1 { int m; }; struct t2 { int m; }; int f(struct t1 *p1, struct t2 *p2) { if (p1->m < 0) p2->m = -p2->m; return p1->m; } int g() { union { struct t1 s1; struct t2 s2; } u; /* ... */ return f(&u.s1, &u.s2); } Why does it matter that the union type is visible to the function f? In reading through the relevant section a couple times,