Mercurial > hg > CbC > CbC_gcc
view CbC-examples/rectypeTest/struct.cbc @ 120:f93fa5091070
fix conv1.c
author | mir3636 |
---|---|
date | Thu, 08 Mar 2018 14:53:42 +0900 |
parents | 85047c4f1ca4 |
children |
line wrap: on
line source
struct aaa { __rectype *child; }; __code test() { struct aaa b; } struct interface { __code (*next)(struct interface); }; #include <stdio.h> #include <stdlib.h> __code csB() { exit(0); } __code print(struct interface p) { puts("hello"); exit(0); } __code csA(struct interface p) { struct interface ds = { csB }; goto p.next(ds); // goto p.next(3); // error } int main() { struct interface ds = { print }; goto csA(ds); return 0; }