|
|
|
|
|
by bubuche87
850 days ago
|
|
I am not sure I understand what you say (despite having read your message several times), but pointers don't have all the same size. Not always, at least.
(void* is supposedly big enough to contain any type of pointer, even if I think I remember I read that it's not necessarily true for function pointers). And if the size of "void" and "char" aren't the same you cannot push two void* on the stack and pop two char*. But, like I said: maybe I didn't understood what you said. |
|
AFAIK, x86, ARM, MIPS, SPARC, Alpha, and SuperH would all work fine calling compare_char though call_void. There could be some other issues, like near/far on 16-bit x86, but that would be orthogonal to implicit function pointer void* casting, and could still occur if call_void was set to compare_void. Do one of the more obscure embedded CPUs still in use have a varying pointer size?