(void *) to function pointer
    Ron Guilmette 
    rfg at NCD.COM
       
    Sat Jan 12 19:09:09 AEST 1991
    
    
  
In article <1991Jan11.174923.7250 at zoo.toronto.edu> henry at zoo.toronto.edu (Henry Spencer) writes:
>
>Yes and no.  The wording of the standard implies, but does not quite
>state explicitly, that there is *some size* of integer that is big enough
>to hold a pointer.  There is no promise that `int' suffices; it might
>have to be `long', or even some nonstandardness like `long long'.
While we are on the subject, I just thought that I would mention a
simple way to drive your typical linker to rant and rave at you:
	void f () { }
	char c = (char) f;
	short s = (short) f;
	int main () { return 0; }
Most linkers cough up some rather interesting messages when confronted
by such programs.
-- 
// Ron Guilmette  -  C++ Entomologist
// Internet: rfg at ncd.com      uucp: ...uunet!lupine!rfg
// Motto:  If it sticks, force it.  If it breaks, it needed replacing anyway.
    
    
More information about the Comp.std.c
mailing list