annotate test/goto.c @ 573:3de2ae36c7e5 more-strict-error

*** empty log message ***
author kono
date Fri, 13 Jan 2006 01:55:33 +0900
parents 388baa7d4bee
children 682c8ec38d45
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
1
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
2
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
3 code (*conv)(int,code (*)());
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
4 code a2(int i,code conv());
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
5 code a3(int i,code conv());
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
6 code a4(int i,code conv());
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
7 code a5(int i,code conv());
572
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
8 code a6();
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
9 code a7();
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
10 code a8();
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
11 code a9();
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
12
572
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
13 char* print_conv(code conv());
193
ce0c38b6c85e try long long
kono
parents: 172
diff changeset
14
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
15 code (*exit0)(int);
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
16 void *env;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
17
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
18 code
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
19 a2(int i,code conv())
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
20 {
573
3de2ae36c7e5 *** empty log message ***
kono
parents: 572
diff changeset
21 printf("#0020:a2 %d %s\n",i,print_conv(conv));
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
22 goto conv(i+1,a4);
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
23 }
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
24
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
25 code
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
26 a3(int i,code (*conv)())
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
27 {
573
3de2ae36c7e5 *** empty log message ***
kono
parents: 572
diff changeset
28 printf("#0027:a3 %d %s\n",i,print_conv(conv));
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
29 goto conv(i+1,a5);
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
30 }
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
31
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
32 code
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
33 a4(int i,code conv())
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
34 {
573
3de2ae36c7e5 *** empty log message ***
kono
parents: 572
diff changeset
35 printf("#0034:a4 %d %s\n",i,print_conv(conv));
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
36 goto (*conv)(i+1,a6);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
37 }
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
38
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
39 code
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
40 a5(int i,code (*conv)())
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
41 {
573
3de2ae36c7e5 *** empty log message ***
kono
parents: 572
diff changeset
42 printf("#0041:a5 %d %s\n",i,print_conv(conv));
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
43 goto (*conv)(i+1,i+2,i+3,a7);
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
44 }
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
45
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
46 code
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
47 a6(int i,int j,int k,code conv())
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
48 {
573
3de2ae36c7e5 *** empty log message ***
kono
parents: 572
diff changeset
49 printf("#0048:a6 %d %s\n",i,print_conv(conv));
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
50 goto conv(i+1,j,k,a8);
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
51 }
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
52
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
53 code
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
54 a7(int i,,int j,int k,code (*conv)())
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
55 {
573
3de2ae36c7e5 *** empty log message ***
kono
parents: 572
diff changeset
56 printf("#0055:a7 %d %s\n",i,print_conv(conv));
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
57 goto conv(i+1,j,k,a9);
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
58 }
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
59
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
60 code
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
61 a8(int i,int j,int k,code conv())
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
62 {
573
3de2ae36c7e5 *** empty log message ***
kono
parents: 572
diff changeset
63 printf("#0062:a8 %d %s\n",i,print_conv(conv));
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
64 goto (*conv)(i+1,j,k,exit0);
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
65 }
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
66
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
67 code
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
68 a9(int i,int j,int k,code (*conv)())
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
69 {
573
3de2ae36c7e5 *** empty log message ***
kono
parents: 572
diff changeset
70 printf("#0069:a9 %d %s\n",i,print_conv(conv));
172
096559f07a70 some check
kono
parents: 80
diff changeset
71 goto (*conv)(0),env;
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
72 }
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
73
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
74 main(int ac,char *av[]) {
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
75 exit0 = return;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
76 env = environment;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
77 conv = a2;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
78 goto conv(1,a3);
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
79 }
572
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
80
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
81 char*
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
82 print_conv(code conv())
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
83 {
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
84 if(conv==a2) return "a2";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
85 if(conv==a3) return "a3";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
86 if(conv==a4) return "a4";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
87 if(conv==a5) return "a5";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
88 if(conv==a6) return "a6";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
89 if(conv==a7) return "a7";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
90 if(conv==a8) return "a8";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
91 if(conv==a9) return "a9";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
92 else return "xx";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
93 }