
Untitled
By: a guest on
May 2nd, 2012 | syntax:
None | size: 0.60 KB | hits: 17 | expires: Never
C11 anonymous structs via typedefs?
typedef struct {
struct {int a, b};
int c;
} abc_struct;
typedef struct {
int a, b;
} ab_struct;
typedef struct {
ab_struct;
int c;
} abc_struct;
foo.c:6: warning: declaration does not declare anything
typedef struct {
int a, b;
} ab_struct;
typedef struct {
ab_struct;
int c;
} abc_struct;
int main() {
abc_struct abc;
abc.a = 5;
return 0;
}
typedef struct {
struct {
int a, b;
};
int c;
} abc_struct;
int main() {
abc_struct abc;
abc.a = 5;
return 0;
}