Mercurial > hg > CbC > old > device
comparison test/goto.c @ 572:388baa7d4bee
more strict errors.
Undeclared identifier
Goto to function, calling code segement
author | kono |
---|---|
date | Fri, 13 Jan 2006 01:51:39 +0900 |
parents | 0c256ea2a97e |
children | 3de2ae36c7e5 |
comparison
equal
deleted
inserted
replaced
571:d78f78ff50d1 | 572:388baa7d4bee |
---|---|
3 code (*conv)(int,code (*)()); | 3 code (*conv)(int,code (*)()); |
4 code a2(int i,code conv()); | 4 code a2(int i,code conv()); |
5 code a3(int i,code conv()); | 5 code a3(int i,code conv()); |
6 code a4(int i,code conv()); | 6 code a4(int i,code conv()); |
7 code a5(int i,code conv()); | 7 code a5(int i,code conv()); |
8 code a6(); | |
9 code a7(); | |
10 code a8(); | |
11 code a9(); | |
8 | 12 |
9 char* | 13 char* print_conv(code conv()); |
10 print_conv(code conv()) | |
11 { | |
12 if(conv==a2) return "a2"; | |
13 if(conv==a3) return "a3"; | |
14 if(conv==a4) return "a4"; | |
15 if(conv==a5) return "a5"; | |
16 if(conv==a6) return "a6"; | |
17 if(conv==a7) return "a7"; | |
18 if(conv==a8) return "a8"; | |
19 if(conv==a9) return "a9"; | |
20 else return "xx"; | |
21 } | |
22 | 14 |
23 code (*exit0)(int); | 15 code (*exit0)(int); |
24 void *env; | 16 void *env; |
25 | 17 |
26 code | 18 code |
83 exit0 = return; | 75 exit0 = return; |
84 env = environment; | 76 env = environment; |
85 conv = a2; | 77 conv = a2; |
86 goto conv(1,a3); | 78 goto conv(1,a3); |
87 } | 79 } |
80 | |
81 char* | |
82 print_conv(code conv()) | |
83 { | |
84 if(conv==a2) return "a2"; | |
85 if(conv==a3) return "a3"; | |
86 if(conv==a4) return "a4"; | |
87 if(conv==a5) return "a5"; | |
88 if(conv==a6) return "a6"; | |
89 if(conv==a7) return "a7"; | |
90 if(conv==a8) return "a8"; | |
91 if(conv==a9) return "a9"; | |
92 else return "xx"; | |
93 } |