Mercurial > hg > CbC > old > device
view test/tmp6.c @ 424:485bf7dde96a non-aligned-bit-field
ARM non-aligned bitfield
author | kono |
---|---|
date | Fri, 29 Oct 2004 20:34:08 +0900 |
parents | 096559f07a70 |
children | c55363eff5e5 |
line wrap: on
line source
#include "stdio.h" int main(ac,av) int ac; char *av[]; { int i; if(ac!=2) { fprintf(stderr,"must have one neumeric argument.\n"); return(0); } i=main0(ac,av,return,environment); fprintf(stderr,"1: %s %d\n",av[0],i); return 0; } int main0(ac,av,ret,retenv) int ac; char *av[]; code (*ret)(); void *retenv; { int i,j,k; i=123; j=456; k = atoi(av[1]); fprintf(stderr,"2: av=%x av[0]=%x %s\n",av,av[0],av[0]); goto code0(i,j,k,av,ret,retenv,return,environment); } code code0(i,j,k,av,ret,retenv,ret1,ret1env) int i,j,k; char *av[]; code (*ret)(); void *retenv; code (*ret1)(); void *ret1env; { char *p; p = av[0]; fprintf(stderr,"3: i=%d j=%d k=%d av=%x p=%s\n",i,j,k,av,p); goto code1(i,j,k,av,ret,retenv,ret1,ret1env); } code code1(i,j,k,av,ret,retenv,ret1,ret1env) int i,j,k; char *av[]; code (*ret)(); void *retenv; code (*ret1)(); void *ret1env; { fprintf(stderr,"4: %s\n",av[0]); goto code2(i,j,k,av,ret,retenv,ret1,ret1env); } code code2(i,j,k,av,ret,retenv,ret1,ret1env) int i,j,k; char *av[]; code (*ret)(); void *retenv; code (*ret1)(); void *ret1env; { fprintf(stderr,"5: %s\n",av[0]); fprintf(stderr,"5: i=%d j=%d k=%d av=%x\n",i,j,k,av); if (k>3) goto (*ret1)(1234),ret1env; goto (*ret)(1234),retenv; }