Anonymous structs have been added in the C11 standard, so
typedef struct {
struct {int a, b};
int c;
} abc_struct;
is valid and standard. Is it also within the standard to use a typedef in place of the full struct declaration? E.g.:
typedef struct {
int a, b;
} ab_struct;
typedef struct {
ab_struct;
int c;
} abc_struct;
The GCC documentation says that this is a Plan 9 extension, but then it works in the few compilers I've tried (including GCC...). By my reading of the standard itself, I think it's OK, but this is the sort of close reading that's easy to screw up.