annotate test/ifdef.c @ 412:6b3385124e5e arm-self-compile

ARM regsiter var pattern fix.
author kono
date Tue, 19 Oct 2004 23:39:42 +0900
parents e1a96bdbe527
children 0c256ea2a97e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
1 #include "stdio.h"
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
2
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
3 /*
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
4 #ifdef TEST
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
5 #define TEST
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
6 #else
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
7 #define TEST
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
8 #endif
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
9 */
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
10 #ifdef TEST
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
11 static char test0[]="test 0 bad\n";
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
12 #ifdef TEST
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
13 bad * bad * bad
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
14 #else
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
15 bad * bad * bad
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
16 #endif
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
17 #else
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
18 static char test0[]="test 0 ok\n";
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
19 /* test nested if and checked undefined macro check */
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
20 #ifdef TEST
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
21 bad * bad * bad
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
22 #else
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
23 /* OK */
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
24 #endif
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
25 #endif
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
26
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
27 #if defined(TEST)
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
28 static char test1[]="test 1 bad\n";
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
29 #else
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
30 static char test1[]="test 1 ok\n";
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
31 #endif
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
32
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
33 #define TEST 1
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
34
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
35 #ifdef TEST
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
36 static char test2[]="test 2 ok\n";
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
37 #else
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
38 static char test2[]="test 2 bad\n";
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
39 #endif
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
40
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
41 #if defined(TEST)
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
42 static char test3[]="test 3 ok\n";
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
43 #else
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
44 static char test3[]="test 3 bad\n";
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
45 #endif
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
46
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
47 #if TEST
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
48 static char test4[]="test 4 ok\n";
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
49 #else
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
50 static char test4[]="test 4 bad\n";
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
51 #endif
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
52
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
53 #if !TEST
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
54 static char test5[]="test 5 bad\n";
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
55 #else
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
56 static char test5[]="test 5 ok\n";
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
57 #endif
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
58
271
e1a96bdbe527 MIPS continue...
kono
parents: 172
diff changeset
59 /* odd comment test */
e1a96bdbe527 MIPS continue...
kono
parents: 172
diff changeset
60
e1a96bdbe527 MIPS continue...
kono
parents: 172
diff changeset
61 #if 0
e1a96bdbe527 MIPS continue...
kono
parents: 172
diff changeset
62 #endif /* whoeh
e1a96bdbe527 MIPS continue...
kono
parents: 172
diff changeset
63 wohefwiehfoi */
e1a96bdbe527 MIPS continue...
kono
parents: 172
diff changeset
64
36
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
65 main()
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
66 {
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
67 /* freopen("mcout.s","w",stdout); */
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
68 printf("test\n");
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
69 printf("%s\n",test0);
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
70 printf("%s\n",test1);
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
71 printf("%s\n",test2);
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
72 printf("%s\n",test3);
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
73 printf("%s\n",test4);
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
74 printf("%s\n",test5);
172
096559f07a70 some check
kono
parents: 36
diff changeset
75 return 0;
36
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
76 }
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
77
9f89cef85b41 *** empty log message ***
kono
parents:
diff changeset
78