Skip to content

Instantly share code, notes, and snippets.

@vault
Created March 27, 2013 17:14
Show Gist options
  • Save vault/5256164 to your computer and use it in GitHub Desktop.
Save vault/5256164 to your computer and use it in GitHub Desktop.
#include <stdio.h>
void *label_value(int really)
{
void *label = &&LABEL;
int x = 2, y = 3;
if (really)
return &&LABEL;
else {
LABEL:
printf("%d, %d\n", x, y);
x = 2, y = 3;
goto *label;
}
}
void jump(void *LABEL)
{
void *label[] = { &&WAT, &&WAT, &&WAT };
int x = 4, y = 5;
goto *LABEL;
WAT:
printf("%d, %d\n", x, y);
}
int main()
{
jump(label_value(1));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment