Mercurial > hg > CbC > old > device
view test/scope.c @ 424:485bf7dde96a non-aligned-bit-field
ARM non-aligned bitfield
author | kono |
---|---|
date | Fri, 29 Oct 2004 20:34:08 +0900 |
parents | f3f2b7906d50 |
children | 0c256ea2a97e |
line wrap: on
line source
/* gcc -g -std=gnu99 test/scope.c */ #include <stdio.h> void f(int *i,void *label) { static int k = 3; { static int k = 3; *i = k++; } k--; printf("f %d\n",k); } int main() { int i,k; void *exit = &&exit0; i = 3;k=10; for(int k=0;k<10;k++) { int i; i = 4; if (({ __label__ exit0; int i; f(&i,&&exit0); if (i==5) goto exit0; printf("2nd inner %d %d %0x\n",i,k,&&exit1==exit); exit0: i; })!=7) { goto exit1; } else goto *exit; exit1: printf("inner %d %d %0x\n",i,k,&&exit1==exit); } k++; exit0: printf("outer %d %d %0x\n",i,k,&&exit0==exit); return 0; }