struct foo {
int foo;
};
struct bar {
const char *bar;
union {
struct foo bar_foo;
int bar_int;
};
};
struct baz {
struct {
const char *baz_str;
int baz_anon;
};
int baz_int;
};
struct foobar {
int foobar_int;
union {
struct foo foo;
struct bar bar;
struct baz baz;
struct {
void *foobar_ptr;
int foobar_anon;
};
};
struct {
int a;
int b;
int c;
};
union {
int d;
int e;
int f;
};
};
struct foo foo = { .foo = 42 };
struct bar bar = { .bar = "hello world", .bar_int = 0x7777 };
struct baz baz = {
.baz_anon = 0x9999,
.baz_str = "It's a trap?!",
.baz_int = -4
};
struct foobar foobar = {
.foobar_int = 0xb295,
.bar = { .bar = "Elbereth", .bar_int = 0x7777 },
.a = 0x9876,
.b = 0x12345,
.c = 0xb22b,
.e = 0xfdcba
};
struct stringless {
union {
struct {
int life;
int hope;
};
int dreams;
union {
char k;
short e;
int f;
long a;
};
double destroy;
};
};
struct stringless stringless = { .life = 0xaa7777aa, .hope = 0x339999ee };
int
main(void)
{
return (0);
}