Mercurial > hg > CbC > CbC_examples
view rectypeTest/typedef2.cbc @ 5:90e6146d24cd
fix stack1.c
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 22 Oct 2014 19:02:57 +0900 |
parents | bacef8675607 |
children |
line wrap: on
line source
typedef __code (*csPtr)(__rectype); //typedef __code (*csPtr)(__code(*p)()); //typedef __code (csPtr)(__code(*p)()); // csPtr *p #include <stdio.h> __code cs_end(csPtr p) { printf("end\n"); } __code cs(csPtr p) { csPtr b; goto p(b); // goto p(3); // note: expected ‘void (*)()’ but argument is of type ‘int’ } int main() { csPtr p; p = cs_end; goto cs(p); return 0; }