Mercurial > hg > CbC > CbC_gcc
view CbC-examples/rectypeTest/struct.cbc @ 118:fd00160c1b76
ifdef TARGET_64BIT
author | mir3636 |
---|---|
date | Tue, 27 Feb 2018 15:01:35 +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; }