xref: /minix3/tests/usr.bin/xlint/lint1/d_c9x_recursive_init.c (revision 11be35a165022172ed3cea20f2b5df0307540b0e)
1*11be35a1SLionel Sambuc /* C9X struct/union member init, with nested union and trailing member */
2*11be35a1SLionel Sambuc union node {
3*11be35a1SLionel Sambuc 	void *next;
4*11be35a1SLionel Sambuc 	char *data;
5*11be35a1SLionel Sambuc };
6*11be35a1SLionel Sambuc struct foo {
7*11be35a1SLionel Sambuc 	int b;
8*11be35a1SLionel Sambuc 	union node n;
9*11be35a1SLionel Sambuc 	int c;
10*11be35a1SLionel Sambuc };
11*11be35a1SLionel Sambuc 
12*11be35a1SLionel Sambuc struct foo f = {
13*11be35a1SLionel Sambuc 	.b = 1,
14*11be35a1SLionel Sambuc 	.n = { .next = 0, },
15*11be35a1SLionel Sambuc 	.c = 1
16*11be35a1SLionel Sambuc };
17