Mercurial > hg > CbC > old > device
view test/tmp2.c @ 746:f8ea174944f2
i64 continue... global table have to be fixed.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Nov 2010 22:19:55 +0900 |
parents | 3f1f6c0610c1 |
children | c2c709727221 |
line wrap: on
line source
#define __environment _CbC_environment #define __return _CbC_return #include "stdio.h" int main(ac,av) int ac; char *av[]; { int i; i=main0(ac,av); fprintf(stdout,"1: %s %d\n",av[0],i); return 0; } int main0(ac,av) int ac; char *av[]; { fprintf(stdout,"2: %s\n",av[0]); goto code0(av,__return,__environment); } __code code0(av,ret,retenv) char *av[]; __code (*ret)(); void *retenv; { char *p; p = av[0]; fprintf(stdout,"3: %s\n",p); goto code1(av,ret,retenv); } __code code1(av,ret,retenv) char *av[]; __code (*ret)(); void *retenv; { fprintf(stdout,"4: %s\n",av[0]); goto (*ret)(1234,retenv); }