Is a redeclaration of an untagged structure a compatible type?
问题 For purposes expressed in this question, we want to do this: typedef struct { int a; } A; typedef struct { struct { int a; }; int b; } B; A *BToA(B *b) { return (A *) b; } B *AToB(A *a) { return (B *) a; } The desire is that the casts conform to C 2011 6.7.2.1 15, which says “A pointer to a structure object, suitably converted, points to its initial member (or if that member is a bit-field, then to the unit in which it resides), and vice versa.” Since the struct { int a; } inside B does not