scc

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

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

 1#define A(x,y) x+y
 2#define B(x,y, ...) (x+y+ __VA_ARGS__ ## 0)
 3#define C(x, ...) test(x, __VA_ARGS__)
 4
 5int
 6test(int n1, int n2, int n3, int n4)
 7{
 8	return n1 + n2 + n3 + n4;
 9}
10
11int
12main(void)
13{
14	int x = 3;
15
16	if (A(1,x) != 4)
17		return 1;
18	if (B(1,x) != 4)
19		return 2;
20	if (B(2,x,3) != 35)
21		return 3;
22	if (C(1, 2, 3, 4) != 10)
23		return 4;
24
25	return 0;
26}