In C, absolutely nothing. This is just the glue of the compiler so you don't do something stupid. In C, the caller is responsible for maintaining the stack frame, so actuation is necessary when the function is called (i.e., the arguments and return value are pushed onto the stack). This makes it safe (r) since the caller's stack is likely to be incorrectly changed. However, the called function may still corrupt the caller's stack in some rare cases.
I must clarify that assignment copies a function pointer. But in C, all function pointers are just pointers. Type and casting are all the glue of the compiler.
Another explanation: the standard indicates (in 6.5.2.2) that the behavior is undefined if the caller uses incompatible types. For example, a cast function that returns void to one that returns int, and then calls this function, the "return" value is meaningless. It is recommended that you include the function in a compatible type before calling it, or you may see unexpected results.
Rick C. Petty
source share