The most similar (but without function): #include <stdio.h> int main () { void *goto_after; /////////////////////// if (0) { test_print1: printf("print1\n"); test_print2: printf("print2\n"); goto *goto_after; } /////////////////////// goto_after = &&label1; goto test_print1; label1: goto_after = &&label2; goto test_print2; label2: return 0; }