Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: Re: ANSI C and function prototypes Message-ID: <6370@utzoo.UUCP> Date: Thu, 6-Feb-86 16:25:30 EST Article-I.D.: utzoo.6370 Posted: Thu Feb 6 16:25:30 1986 Date-Received: Thu, 6-Feb-86 16:25:30 EST References: <681@harvard.UUCP> Organization: U of Toronto Zoology Lines: 16 > ...Is there any way to prototype the second argument as a pointer to > a function returning 'anything'? I realize if I prototype the second > argument as a 'void *pointer', any pointer will be properly converted, > but this defeats my purpose of checking to make sure that the second > argument is really a function pointer... Prototyping it as "void *" is wrong too, and a strict ANSI-compliant compiler will reject use of it as illegal. "void *" is a generic *data* pointer, and function pointers are not data pointers. The ANSI drafts say that mixing function pointers and data pointers is illegal, period, although it is listed in the relevant appendix as a "common extension". It certainly is a potential portability problem even if the compiler permits it. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry