annotate test/func_conv_err.c @ 581:ad9ef203f95b

*** empty log message ***
author kono
date Sun, 15 Jan 2006 22:40:23 +0900
parents aad312f61654
children 682c8ec38d45
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
572
388baa7d4bee more strict errors.
kono
parents:
diff changeset
1
388baa7d4bee more strict errors.
kono
parents:
diff changeset
2 code hoge()
388baa7d4bee more strict errors.
kono
parents:
diff changeset
3 {
388baa7d4bee more strict errors.
kono
parents:
diff changeset
4 goto hoge(); // ok
388baa7d4bee more strict errors.
kono
parents:
diff changeset
5 }
388baa7d4bee more strict errors.
kono
parents:
diff changeset
6
388baa7d4bee more strict errors.
kono
parents:
diff changeset
7 int
388baa7d4bee more strict errors.
kono
parents:
diff changeset
8 f()
388baa7d4bee more strict errors.
kono
parents:
diff changeset
9 {
388baa7d4bee more strict errors.
kono
parents:
diff changeset
10 return 1;
388baa7d4bee more strict errors.
kono
parents:
diff changeset
11 }
388baa7d4bee more strict errors.
kono
parents:
diff changeset
12
388baa7d4bee more strict errors.
kono
parents:
diff changeset
13 code hoga(int i)
388baa7d4bee more strict errors.
kono
parents:
diff changeset
14 {
388baa7d4bee more strict errors.
kono
parents:
diff changeset
15 f(); // ok
388baa7d4bee more strict errors.
kono
parents:
diff changeset
16 h(); // ok h() is a function
388baa7d4bee more strict errors.
kono
parents:
diff changeset
17 if (i)
388baa7d4bee more strict errors.
kono
parents:
diff changeset
18 goto f(); // bad
574
aad312f61654 remove too much inmode.
kono
parents: 572
diff changeset
19 else if(i-1)
572
388baa7d4bee more strict errors.
kono
parents:
diff changeset
20 goto g(i); // ok g() is a code segement
574
aad312f61654 remove too much inmode.
kono
parents: 572
diff changeset
21 } // need goto bad
572
388baa7d4bee more strict errors.
kono
parents:
diff changeset
22
388baa7d4bee more strict errors.
kono
parents:
diff changeset
23 int
574
aad312f61654 remove too much inmode.
kono
parents: 572
diff changeset
24 g(int i) { // g is already used as code bad
572
388baa7d4bee more strict errors.
kono
parents:
diff changeset
25 k();
388baa7d4bee more strict errors.
kono
parents:
diff changeset
26 if (i)
388baa7d4bee more strict errors.
kono
parents:
diff changeset
27 goto h(); // bad
388baa7d4bee more strict errors.
kono
parents:
diff changeset
28 // should complain.... no return value
388baa7d4bee more strict errors.
kono
parents:
diff changeset
29 }
388baa7d4bee more strict errors.
kono
parents:
diff changeset
30
574
aad312f61654 remove too much inmode.
kono
parents: 572
diff changeset
31 code k() { // bad k is already used as function
572
388baa7d4bee more strict errors.
kono
parents:
diff changeset
32 goto hoge(); // ok
388baa7d4bee more strict errors.
kono
parents:
diff changeset
33 }
388baa7d4bee more strict errors.
kono
parents:
diff changeset
34
388baa7d4bee more strict errors.
kono
parents:
diff changeset
35 int
388baa7d4bee more strict errors.
kono
parents:
diff changeset
36 main()
388baa7d4bee more strict errors.
kono
parents:
diff changeset
37 {
388baa7d4bee more strict errors.
kono
parents:
diff changeset
38 hoge(); // bad
574
aad312f61654 remove too much inmode.
kono
parents: 572
diff changeset
39 return 0;
572
388baa7d4bee more strict errors.
kono
parents:
diff changeset
40 }
388baa7d4bee more strict errors.
kono
parents:
diff changeset
41