Mercurial > ~dholland > hg > tradcpp > index.cgi
annotate tests/t08.c @ 97:83ad94eec98f
don't rely on netbsd cdefs.h
author | David A. Holland |
---|---|
date | Mon, 10 Jun 2013 23:46:47 -0400 |
parents | c24cbfa44f81 |
children |
rev | line source |
---|---|
34
c24cbfa44f81
Don't actually include stdio.h in this for testing cpp.
David A. Holland
parents:
28
diff
changeset
|
1 /*#include <stdio.h>*/ |
28 | 2 |
3 int d = | |
4 #if 2 > 1 ? 0 : 0 ? 1 : 1 | |
5 1 | |
6 #else | |
7 0 | |
8 #endif | |
9 ; | |
10 | |
11 int e = | |
12 #if (2 > 1 ? 0 : 0) ? 1 : 1 | |
13 1 | |
14 #else | |
15 0 | |
16 #endif | |
17 ; | |
18 | |
19 int f = | |
20 #if 2 > 1 ? 0 : (0 ? 1 : 1) | |
21 1 | |
22 #else | |
23 0 | |
24 #endif | |
25 ; | |
26 | |
27 | |
28 int | |
29 main() | |
30 { | |
31 int a, b, c; | |
32 | |
33 a = 2 > 1 ? 0 : 0 ? 1 : 1; | |
34 b = (2 > 1 ? 0 : 0) ? 1 : 1; | |
35 c = 2 > 1 ? 0 : (0 ? 1 : 1); | |
36 | |
37 printf("%d %d %d\n", a, b, c); | |
38 printf("%d %d %d\n", d, e, f); | |
39 | |
40 return 0; | |
41 } |