void f(void);
void (*pf)(void) = f;
void *p = &pf;
(*(void (**)(void))p)();
I tried to find the part in the C standard (draft) document that states about such conversion. But I failed to do so in my last 30 minutes.
How is the conversion between a void pointer and a pointer to function pointer defined?
§6.3.2.3/p1:
§6.2.5/p20:
"pointer to function" is an object type, so "pointer to pointer to function" is a pointer to an object type, and so is convertible to and from "pointer to
void
" by §6.3.2.3/p1.