Xref: utzoo comp.lang.c:35256 comp.std.c:4129 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!decwrl!infopiz!lupine!rfg From: rfg@NCD.COM (Ron Guilmette) Newsgroups: comp.lang.c,comp.std.c Subject: Re: (void *) to function pointer Message-ID: <3322@lupine.NCD.COM> Date: 12 Jan 91 08:09:09 GMT References: <1991Jan9.000809.9152@brolga.cc.uq.oz.au> <1037@mwtech.UUCP> <1991Jan11.174923.7250@zoo.toronto.edu> Followup-To: comp.lang.c Organization: Network Computing Devices, Inc., Mt. View, CA Lines: 26 In article <1991Jan11.174923.7250@zoo.toronto.edu> henry@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@ncd.com uucp: ...uunet!lupine!rfg // Motto: If it sticks, force it. If it breaks, it needed replacing anyway.