Mercurial > hg > Papers > 2010 > kent-master
annotate sources/cbcreturn.cbc @ 7:8ef81ff8cb52
emended.
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 13:10:57 +0900 |
parents | d2999e94b97d |
children |
rev | line source |
---|---|
7 | 1 code cs(code (*ret)(int)) |
1 | 2 { |
3 goto ret(2); | |
4 } | |
5 | |
6 int funcB() | |
7 { | |
7 | 8 code (*ret)(int); |
9 ret = __return; | |
1 | 10 /* do something. */ |
7 | 11 goto cs(ret); |
1 | 12 |
13 /* never reached. */ | |
14 return -1; | |
15 } | |
16 | |
17 void funcA() | |
18 { | |
19 int t; | |
20 | |
21 t = funcB(); | |
22 | |
23 printf("t=%d\n", t); | |
24 /* t should not be -1 but 2. */ | |
25 } |