Casting an address of subroutine into void pointer
问题 Is it okay to cast function location with void pointer though function pointers size is not always the same as opaque pointer size? I already did search about opaque pointers , and casting function pointers . I found out function pointers and normal pointers are not the same on some systems. void (*fptr)(void) = (void *) 0x00000009; // is that legal??? I feel I should do this void (*fptr)(void)= void(*)(void) 0x00000009; It did work fine , though I expected some errors or at least warnings I