Mercurial > hg > CbC > CbC_gcc
view CbC-examples/test_para.c @ 66:b362627d71ba
bug-fix: modify tail-call-optimization enforcing rules. (calls.c.)
author | Ryoma SHINYA <shinya@firefly.cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 14 Dec 2010 03:58:33 +0900 |
parents | 4c6926a2b9bc |
children |
line wrap: on
line source
#include<stdio.h> #include<stdlib.h> __code cs_exit(int a){ printf("cs_exit was called: a=%d.\n", a); exit(a); } __code cs0(int a, double b, int c, int d){ printf("cs0 was called: a=%d, b=%lf, c=%d, d=%d.\n", a, b, c, d); goto cs_exit( (int)(20*a + 4.4*b + 2022/c + 28*d) ); } __code cs_goto(){ goto cs0(11, 22.2, 33, 44); } int main(int argc, char **argv){ printf("it is in main.\n"); goto cs_goto(); return 0; }