annotate test/func_conv_err.c @ 704:6e6dc2d644ed

*** empty log message ***
author kono
date Wed, 24 Oct 2007 00:13:06 +0900
parents 682c8ec38d45
children 3f1f6c0610c1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
572
388baa7d4bee more strict errors.
kono
parents:
diff changeset
1
622
682c8ec38d45 _code へ
kono
parents: 574
diff changeset
2 __code hoge()
572
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
622
682c8ec38d45 _code へ
kono
parents: 574
diff changeset
13 __code hoga(int i)
572
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)
622
682c8ec38d45 _code へ
kono
parents: 574
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
622
682c8ec38d45 _code へ
kono
parents: 574
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
622
682c8ec38d45 _code へ
kono
parents: 574
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