Mercurial > hg > CbC > old > device
view test/scope.c @ 449:c55363eff5e5
parallel assignment (modify not completed)
author | kono |
---|---|
date | Thu, 25 Nov 2004 16:56:26 +0900 |
parents | 0c256ea2a97e |
children | eaf9e2746c83 |
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("#0017: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("#0035:2nd inner %d %d %0x\n",i,k,&&exit1==exit); exit0: i; })!=7) { goto exit1; } else goto *exit; exit1: printf("#0043:inner %d %d %0x\n",i,k,&&exit1==exit); } k++; exit0: printf("#0047:outer %d %d %0x\n",i,k,&&exit0==exit); return 0; }