Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!zehntel!hplabs!sdcrdcf!sdcsvax!akgua!mcnc!rti!rti-sel!trt
From: trt@rti-sel.UUCP
Newsgroups: net.lang.c
Subject: Re: Varargs in new C standard
Message-ID: <1170@rti-sel.UUCP>
Date: Fri, 10-Aug-84 14:37:51 EDT
Article-I.D.: rti-sel.1170
Posted: Fri Aug 10 14:37:51 1984
Date-Received: Tue, 14-Aug-84 00:56:47 EDT
References: metheus.261 <2928@watcgl.UUCP>
Lines: 22

None of the proposals I have seen would fix the 'execl' problem:
	execl("/bin/date", "date", 0);	/* should be (char *)0 */

FIX 1 (a varying number of arguments of specified type):
	int execl(char * ...);	/* no comma! (yup, obscure) */
to mean 0 or more arguments of type char *, whereas
	int printf(char *, ...);
means a char * followed by 0 or more arguments of unknown type.
The correct specification for execl would really be:
	int execl(char *, char * ...);	/* execl has >= 1 argument */
I suppose one might have a strange function like:
	int weird(int ..., float, ..., char *);
which means ... oh forget it.  Pity the compiler writers.

FIX 2 (overloaded(?) declarations):
	int execl(char *); int execl(char *, char *);
	int execl(char *, char *, char *); ...

I prefer FIX 1 since it is more compact and covers all the varargs
programs I can think of.  It would be reasonable to require
that the '...' must appear last (to simplify implementation).
	Tom Truscott