So I'm sure that
sizeof(void*) (data pointer) and
sizeof(void (*)()) (fn pointer) in C are not guaranteed to be the same — does anyone know of any actual architectures where data and function pointers are really different?
16-bit PIC microcontrollers, apparently, and also classic DOS 8086 machines
the POSIX standard apparently only requires that
void (*)() be storable in
as in, fn ptrs must be smaller?
is that the case on this architectures you mentioned?
not on 16-bit pic - SRAM is more expensive than ROM, so data pointers can be smaller, apparently
and the Medium memory model on x86 used 32-bit void()() and 16-bit void