You may think of this:
#include <stdio.h>
int main(void)
{
printf("%p\n", main);
return 0;
}
However, with gcc -std=c11 -pedantic you get:
warning: format '%p' expects argument of type
void *, but argument 2 has typeint (*)(void)[-Wformat=]
Then you may think of this:
#include <stdio.h>
int main(void)
{
printf("%p\n", (void*)main);
return 0;
}
However, with gcc -std=c11 -pedantic you get:
warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]