Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!ames!amdahl!cerebus!fai!wjvax!brett From: brett@wjvax.UUCP (Brett Galloway) Newsgroups: comp.lang.c Subject: Re: Function prototypes versus open() Message-ID: <931@wjvax.wjvax.UUCP> Date: Sat, 30-May-87 17:59:00 EDT Article-I.D.: wjvax.931 Posted: Sat May 30 17:59:00 1987 Date-Received: Tue, 2-Jun-87 06:17:22 EDT References: <18346@ucbvax.BERKELEY.EDU> <8042@utzoo.UUCP> <2210@hoptoad.uucp> <2619@ulysses.homer.nj.att.com> Reply-To: brett@wjvax.UUCP (Brett Galloway) Organization: Watkins-Johnson Co., San Jose, Calif. Lines: 28 In article <2619@ulysses.homer.nj.att.com> jss@hector (Jerry Schwarz) writes: >In article <2210@hoptoad.uucp> gnu@hoptoad.uucp (John Gilmore) writes: >>I think I've found a problem with the C standard. (greek chorus: >>It says that functions with variable numbers of "so what else >>arguments cannot be called unless a function is new?") >>prototype is in scope. >It is not a restriction on the compiler (or compiler writer), it is a >requirement on the (application) programmer. The intention, as I >read it, is to allow a C compilation system to use a different >calling sequence for functions with known numbers of arguments and >those (like printf) with variable numbers of arguments. How about functions called with function pointers? I am not that familiar with the details of function prototyping in the standard, but will it be possible to invoke functions with variable arguments with function pointers? If not, that will be quite annoying (and will break an application that I have written (under UNIX C). How about functions called with function pointers? It seems to me that the only way separate calling sequences for non-variable argument and variable argument functions could work would be to disallow function pointers to the latter type. In that case, this seems a serious deficiency of the requirement. At minimum, it breaks an application that I have written under UNIX C (bsd), which otherwise adheres to the varargs(3) specifications. -- ------------- Brett Galloway {pesnta,twg,ios,qubix,turtlevax,tymix,vecpyr,certes,isi}!wjvax!brett