scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1struct f {
 2	int fd;
 3        unsigned char *buf;
 4        unsigned char unbuf[1];
 5	unsigned char *rp;
 6};
 7
 8#define stderr (&buf[2])
 9
10struct f f;
11
12struct f buf[] = {
13	{
14		.fd = 0,
15	},
16	{
17		.fd = -1,
18		.buf = f.unbuf,
19	},
20	{
21		.fd = 2,
22		.buf = stderr->unbuf,
23		.rp = stderr->unbuf,
24	},
25};
26
27int
28main()
29{
30	if (buf[2].unbuf != buf[2].rp)
31		return 1;
32	if (buf[2].unbuf != buf[2].buf)
33		return 2;
34	if (buf[1].buf != f.unbuf)
35		return 3;
36	return 0;
37}