view paper/sources/cbcreturn.cbc @ 10:3d9addf62d0b

organized repository.
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Tue, 16 Feb 2010 14:35:36 +0900
parents
children
line wrap: on
line source

code cs(code (*ret)(int))
{
    goto ret(2);
}

int funcB()
{
    code (*ret)(int);
    ret = __return;
    /* do something.  */
    goto cs(ret);

    /* never reached.  */
    return -1;
}

void funcA()
{
    int t;

    t = funcB();

    printf("t=%d\n", t);
    /* t should not be -1 but 2.  */
}