Mercurial > hg > CbC > CbC_gcc
view CbC-examples/test_tailcall1.c @ 21:959d4c8c8abc
add conv.c conv1.c
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 29 Sep 2009 20:15:16 +0900 |
parents | 4c6926a2b9bc |
children |
line wrap: on
line source
#include<stdio.h> void B(int a, int b, int c){ printf("B: a=%d, b=%d, c=%d\n", a, b, c); return ; } void* freturn(){ return B; } void A(int a, int b, int c, int d){ void (*fp)(int, int, int); fp = freturn(); printf("A: a=%d, b=%d, c=%d, d=%d\n", a, b, c, d); return fp(a, b, c+d); //return B(a, b, c+d); } int main(int argc, char **argv){ printf("main: \n"); //fp = B; A(10, 20, 30, 40); return 0; }