AnsweredAssumed Answered

global label declaration

Question asked by Robert Ouellette on May 23, 2007
Latest reply on May 31, 2007 by CrasyCat
Hi,

Is there such a thing as a "global label" in C where I can goto a label in one function from another?  GNU C has a label declaration "__label__" that looks like it could work but it doesn't work in Codewarrior.  I can't seem to find a solution in C.  Below is what I am trying to do conceptually.  Any help would be appreciated.

__label__ mylabel;

void function1(void)
{
mylabel:
    ;
    return;
}
void function2(void)
{
    extern __label__ mylabel;
    goto mylabel;
    return;
}

Outcomes