Mercurial > hg > CbC > CbC_gcc
view CbC-examples/test05.c @ 103:edcadcec937d
modify __rectype
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 23 Mar 2012 17:11:33 +0900 |
parents | f9b1a53df341 |
children | 5d30d517ebed |
line wrap: on
line source
//#include<stdio.h> #define dprint(f, args...) \ printf("in %s: "f, __FUNCTION__, ## args) __code caller (int a); void f01 (int a); void f02 (int a, float b); __code cs01 (int a); __code cs02 (int a, float b); int main (); int g=0; void (*funcp)(int); __code (*csp)(int); __code caller(int a) { f01(a+2); f02(a+3, 13.2); funcp(a+4); goto csp(a+4); dprint("\n"); } __code end() { dprint("\n"); exit(0); } void f01(int a) { dprint("%d\n", a); g += a; return ; } void f02(int a, float b) { dprint("%d, %f\n", a, b); g -= a; g += b*0.3; return ; } __code cs01(int a) { dprint("%d\n", a); g += a; goto end() ; } __code cs02(int a, float b) { dprint("%d, %f\n", a, b); g -= a; g += b*0.3; goto end() ; } int main() { funcp = f01; csp = cs01; caller(10); }