Mercurial > hg > CbC > old > device
view test/func_conv_err.c @ 725:3f1f6c0610c1
goto with enviornment syntax changed.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 20 Aug 2009 16:39:02 +0900 |
parents | 682c8ec38d45 |
children | 5313ed059cee |
line wrap: on
line source
#define __environment _CbC_environment #define __return _CbC_return __code hoge() { goto hoge(); // ok } int f() { return 1; } __code hoga(int i) { f(); // ok h(); // ok h() is a function if (i) goto f(); // bad else if(i-1) goto g(i); // ok g() is a __code segement } // need goto bad int g(int i) { // g is already used as __code bad k(); if (i) goto h(); // bad // should complain.... no return value } __code k() { // bad k is already used as function goto hoge(); // ok } int main() { hoge(); // bad return 0; }