Mercurial > hg > CbC > old > device
view test/tmp8.c @ 312:a93e619cf772
typeof, MIPS stdarg
author | kono |
---|---|
date | Sat, 12 Jun 2004 15:58:56 +0900 |
parents | 096559f07a70 |
children | f73b93de216a |
line wrap: on
line source
#include <alloca.h> int asize = 100; int f(int i,int j,int k,int *l); int g(); int main() { int a[0] ; printf("%d %d\n",g(),f(0,1,2,a)); return 0; } int g() { int k = 0,i; char *p = alloca(asize); for(i=0;i<100;i++) p[i]=i; for(i=0;i<100;i++) k += p[i]; return k; } int f(int i,int j,int k,int *l) { *l = 3; if (i++ >20) return *l; return f(i,j,k,(int*)alloca(asize)); }