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