Skip to content

Instantly share code, notes, and snippets.

@squm
Created January 8, 2015 06:12
Show Gist options
  • Save squm/d11b931d51dc9d4f8157 to your computer and use it in GitHub Desktop.
Save squm/d11b931d51dc9d4f8157 to your computer and use it in GitHub Desktop.
typedef void (*IMP)(void);
typedef void (*IMP2);
void
ifc(int i, float f, char c) {
}
int
main() {
void *p = ifc;
void *(f1) = ifc;
void (*f2)(int, float, char);
f2 = ifc;
f2 = (void *)ifc;
f2 = (void (*))ifc;
f2 = (void (*)(int, float, char))ifc;
IMP imp;
imp = (void *)ifc; /* (1) */
imp = (void (*))ifc; /* (2) */
// imp = (void (*)(int, float, char))ifc; /* (3) */
IMP2 imp2;
imp2 = (void *)ifc; /* (4) */
imp2 = (void (*))ifc; /* (5) */
imp2 = (void (*)(int, float, char))ifc; /* (6) */
imp2 = (void (*)(int, int, int))0; /* (7) */
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment