xref: /freebsd/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_recursive_init.c (revision 9268022b74279434ed6300244e3f977e56a8ceb5)
1*57718be8SEnji Cooper /* C99 recursive struct/union initialization */
2*57718be8SEnji Cooper struct top {
3*57718be8SEnji Cooper 	int i;
4*57718be8SEnji Cooper 	char c;
5*57718be8SEnji Cooper 	union onion {
6*57718be8SEnji Cooper 		short us;
7*57718be8SEnji Cooper 		char uc;
8*57718be8SEnji Cooper 	}  u;
9*57718be8SEnji Cooper 	char *s;
10*57718be8SEnji Cooper } c[] = {
11*57718be8SEnji Cooper 	{ .s = "foo", .c = 'b', .u = { .uc = 'c' } },
12*57718be8SEnji Cooper 	{ .i = 1, .c = 'a', .u = { .us = 2 } },
13*57718be8SEnji Cooper };
14