Newer
Older
ubixos / contrib / netbsd-tests / usr.bin / xlint / lint1 / d_compound_literals2.c
@Charlie Root Charlie Root on 31 Dec 2017 193 bytes More Cleanup
/* compound literals */

struct p {
	short a, b, c, d;
} zz = {
	1, 2, 3, 4
};

struct p *bar(int i)
{
	static struct p q[10];
	return &q[i];
}

foo()
{
	*bar(1) = (struct p) { 1, 2, 3, 4 };
}