xref: /minix3/tests/usr.bin/xlint/lint1/d_compound_literals2.c (revision 11be35a165022172ed3cea20f2b5df0307540b0e)
1 /* compound literals */
2 
3 struct p {
4 	short a, b, c, d;
5 } zz = {
6 	1, 2, 3, 4
7 };
8 
bar(int i)9 struct p *bar(int i)
10 {
11 	static struct p q[10];
12 	return &q[i];
13 }
14 
foo()15 foo()
16 {
17 	*bar(1) = (struct p) { 1, 2, 3, 4 };
18 }
19