diff options
Diffstat (limited to 'contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_recursive_init.c')
-rw-r--r-- | contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_recursive_init.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_recursive_init.c b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_recursive_init.c new file mode 100644 index 0000000..347644f --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_recursive_init.c @@ -0,0 +1,13 @@ +/* C99 recursive struct/union initialization */ +struct top { + int i; + char c; + union onion { + short us; + char uc; + } u; + char *s; +} c[] = { + { .s = "foo", .c = 'b', .u = { .uc = 'c' } }, + { .i = 1, .c = 'a', .u = { .us = 2 } }, +}; |