Created
July 1, 2009 14:44
-
-
Save dchiji/138818 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdarg.h> | |
void cps(int a, int b, ...) | |
{ | |
void *p; | |
void *m; | |
va_list ap; | |
va_start(ap, b); | |
p = va_arg(ap, void *); | |
m = va_arg(ap, void *); | |
goto *p; | |
} | |
void f(void) | |
{ | |
cps(1, 2, &&cont); | |
printf("tes\n"); | |
cont: | |
printf("middle\n"); | |
return; | |
} | |
main() | |
{ | |
f(); | |
printf("end\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment