xref: /netbsd-src/external/bsd/tradcpp/dist/tests/t08.c (revision 31615c9617fab4df7f5e221552df7da87f14320d)
1*31615c96Sdholland /*#include <stdio.h>*/
2*31615c96Sdholland 
3*31615c96Sdholland int d =
4*31615c96Sdholland #if 2 > 1 ? 0 : 0 ? 1 : 1
5*31615c96Sdholland 1
6*31615c96Sdholland #else
7*31615c96Sdholland 0
8*31615c96Sdholland #endif
9*31615c96Sdholland ;
10*31615c96Sdholland 
11*31615c96Sdholland int e =
12*31615c96Sdholland #if (2 > 1 ? 0 : 0) ? 1 : 1
13*31615c96Sdholland 1
14*31615c96Sdholland #else
15*31615c96Sdholland 0
16*31615c96Sdholland #endif
17*31615c96Sdholland ;
18*31615c96Sdholland 
19*31615c96Sdholland int f =
20*31615c96Sdholland #if 2 > 1 ? 0 : (0 ? 1 : 1)
21*31615c96Sdholland 1
22*31615c96Sdholland #else
23*31615c96Sdholland 0
24*31615c96Sdholland #endif
25*31615c96Sdholland ;
26*31615c96Sdholland 
27*31615c96Sdholland 
28*31615c96Sdholland int
main()29*31615c96Sdholland main()
30*31615c96Sdholland {
31*31615c96Sdholland 	int a, b, c;
32*31615c96Sdholland 
33*31615c96Sdholland 	a = 2 > 1 ? 0 : 0 ? 1 : 1;
34*31615c96Sdholland 	b = (2 > 1 ? 0 : 0) ? 1 : 1;
35*31615c96Sdholland 	c = 2 > 1 ? 0 : (0 ? 1 : 1);
36*31615c96Sdholland 
37*31615c96Sdholland 	printf("%d %d %d\n", a, b, c);
38*31615c96Sdholland 	printf("%d %d %d\n", d, e, f);
39*31615c96Sdholland 
40*31615c96Sdholland 	return 0;
41*31615c96Sdholland }
42