Mercurial > hg > CbC > old > device
comparison test/func_conv_err.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 | |
children | aad312f61654 |
comparison
equal
deleted
inserted
replaced
571:d78f78ff50d1 | 572:388baa7d4bee |
---|---|
1 | |
2 code hoge() | |
3 { | |
4 goto hoge(); // ok | |
5 } | |
6 | |
7 int | |
8 f() | |
9 { | |
10 return 1; | |
11 } | |
12 | |
13 code hoga(int i) | |
14 { | |
15 f(); // ok | |
16 h(); // ok h() is a function | |
17 if (i) | |
18 goto f(); // bad | |
19 else | |
20 goto g(i); // ok g() is a code segement | |
21 } | |
22 | |
23 int | |
24 g(int i) | |
25 { // g is already used as code bad | |
26 k(); | |
27 if (i) | |
28 goto h(); // bad | |
29 // should complain.... no return value | |
30 } | |
31 | |
32 code k() | |
33 { // bad k is already used as function | |
34 goto hoge(); // ok | |
35 } | |
36 | |
37 int | |
38 main() | |
39 { | |
40 hoge(); // bad | |
41 } | |
42 |