diff options
Diffstat (limited to 'contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_struct.c')
-rw-r--r-- | contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_struct.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_struct.c b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_struct.c new file mode 100644 index 0000000..367b56f --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_struct.c @@ -0,0 +1,26 @@ +/* Anonymous struct test */ + +typedef int type; + +struct point { + int x; + int y; +}; + +struct bar { + struct { + struct point top_left; + struct point bottom_right; + }; + type z; +}; + + +int +main(void) +{ + struct bar b; + b.top_left.x = 1; + return 0; +} + |