Files
codeql/cpp/ql/test/library-tests/stmt/computed_goto/computedgoto.c
2018-08-02 17:53:23 +01:00

17 lines
168 B
C

void computed_goto_test()
{
void *ptr;
int i = 0;
myLabel1:
if (++i == 1)
{
ptr = &&myLabel1;
} else {
ptr = &&myLabel2;
}
goto *ptr;
myLabel2:
}