Skip to content

Instantly share code, notes, and snippets.

@dchiji
Created July 1, 2009 14:44
Show Gist options
  • Save dchiji/138818 to your computer and use it in GitHub Desktop.
Save dchiji/138818 to your computer and use it in GitHub Desktop.
#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