36
|
1 #include "stdio.h"
|
|
2
|
|
3 /*
|
|
4 #ifdef TEST
|
|
5 #define TEST
|
|
6 #else
|
|
7 #define TEST
|
|
8 #endif
|
|
9 */
|
|
10 #ifdef TEST
|
|
11 static char test0[]="test 0 bad\n";
|
|
12 #ifdef TEST
|
|
13 bad * bad * bad
|
|
14 #else
|
|
15 bad * bad * bad
|
|
16 #endif
|
|
17 #else
|
|
18 static char test0[]="test 0 ok\n";
|
|
19 /* test nested if and checked undefined macro check */
|
|
20 #ifdef TEST
|
|
21 bad * bad * bad
|
|
22 #else
|
|
23 /* OK */
|
|
24 #endif
|
|
25 #endif
|
|
26
|
|
27 #if defined(TEST)
|
|
28 static char test1[]="test 1 bad\n";
|
|
29 #else
|
|
30 static char test1[]="test 1 ok\n";
|
|
31 #endif
|
|
32
|
|
33 #define TEST 1
|
|
34
|
|
35 #ifdef TEST
|
|
36 static char test2[]="test 2 ok\n";
|
|
37 #else
|
|
38 static char test2[]="test 2 bad\n";
|
|
39 #endif
|
|
40
|
|
41 #if defined(TEST)
|
|
42 static char test3[]="test 3 ok\n";
|
|
43 #else
|
|
44 static char test3[]="test 3 bad\n";
|
|
45 #endif
|
|
46
|
|
47 #if TEST
|
|
48 static char test4[]="test 4 ok\n";
|
|
49 #else
|
|
50 static char test4[]="test 4 bad\n";
|
|
51 #endif
|
|
52
|
|
53 #if !TEST
|
|
54 static char test5[]="test 5 bad\n";
|
|
55 #else
|
|
56 static char test5[]="test 5 ok\n";
|
|
57 #endif
|
|
58
|
271
|
59 /* odd comment test */
|
|
60
|
|
61 #if 0
|
|
62 #endif /* whoeh
|
|
63 wohefwiehfoi */
|
|
64
|
36
|
65 main()
|
|
66 {
|
|
67 /* freopen("mcout.s","w",stdout); */
|
|
68 printf("test\n");
|
|
69 printf("%s\n",test0);
|
|
70 printf("%s\n",test1);
|
|
71 printf("%s\n",test2);
|
|
72 printf("%s\n",test3);
|
|
73 printf("%s\n",test4);
|
|
74 printf("%s\n",test5);
|
172
|
75 return 0;
|
36
|
76 }
|
|
77
|
|
78
|