I came across this FAQ:  Pointers to member functions ..Updated!.., C++ FAQ Lite
One of the questions is
[33.8] Can I convert a pointer-to-function to a void*?
And they answer this with a "no, it's illegal". First my question: is it really illegal? I wouldn't have thought so. Let me explain why.
First let's consider C. We're free to convert any type of pointer to a void pointer without casting, and we're free to convert it back without any problems. So in C, this would definitely seem legal. So I would derive from that that on any architecture a pointer is a compatible type with a void pointer. That is, they are always the same size (or a void pointer is always the largest type, so it can hold any other type of pointer).
Now in C++ it was changed so you can no longer cast implicitly to or from void pointers. However, as far as I know, the underlying structure of the pointers still follow the same rules and thus it should still be legal to my understanding to cast a function pointer to a void pointer and back to a function pointer.
I believe that the implicit casting from/to void* was disabled because of classes, because it could result in very strange bugs if you would allow it, bugs that now require explicit casting.
Besides, I still see loads of APIs where you have to cast arguments to void*. pthread_create is an example. Even though it's a C API, it is assumed to be completely compatible with C++ as well, which it wouldn't be if you can not cast a pointer-to-function to a void*.
So, again: Can I "convert" (cast) a pointer-to-function to a void*? If not, could you explain what the C++ standard says that makes it illegal?