view CbC-examples/rectypeTest/struct.cbc @ 124:c3a50d7877e8

fix ipa-inline.c
author mir3636
date Sat, 31 Mar 2018 17:18:55 +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;
}