You should not be trying to do this. It won't work.
When you call a function, the computer might have to do a lot of "behind the scenes" work to do it... such as pushing parameters to the stack, and adjusting the stack pointer, etc, etc.
If you cast that function to some incompatible type, then try to call it, the stack could be screwed up. Possibly leading to memory corruption and other "very bad things".
So yeah. What's you're trying to do is wrong. Don't do it.