view rectypeTest/typedef3.cbc @ 0:bacef8675607

init repository
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 14 Oct 2014 17:34:59 +0900
parents
children
line wrap: on
line source

typedef __code (*csPtr)(__rectype*);

#include <stdio.h>
__code cs_end(csPtr *p)
{
  printf("end\n");
}

__code cs(csPtr p)
{
  csPtr *b; //  <- This declaration please care.
  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;
}