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