Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!im4u!ut-sally!pyramid!pesnta!wjvax!brett From: brett@wjvax.UUCP (Brett Galloway) Newsgroups: net.lang.c Subject: Re: varargs fails on typedefs Message-ID: <737@wjvax.wjvax.UUCP> Date: Thu, 31-Jul-86 12:45:39 EDT Article-I.D.: wjvax.737 Posted: Thu Jul 31 12:45:39 1986 Date-Received: Sat, 2-Aug-86 08:55:30 EDT References: <2640@brl-smoke.ARPA> Reply-To: brett@wjvax.UUCP (Brett Galloway) Organization: Watkins-Johnson Co., San Jose, Calif. Lines: 29 Keywords: varargs In article <2640@brl-smoke.ARPA> version B 2.10.3 4.3bsd-beta 6/6/85; site wjvax.wjvax.UUCP wjvax!qubix!saber!sun!decwrl!pyramid!hplabs!tektronix!uw-beaver!cornell!rochester!seismo!lll-crg!caip!brl-adm!brl-smoke!smoke!rbj@icst-cmr rbj@icst-cmr (Root Boy Jim) writes: >> This makes the typedef completely useless. >Only for varargs use. You can always have *two* typedefs, one for >definitions, and one for argument declarations. I know, yuk! >> To fix this problem, I propose a promote() operator, as follows: >Clearly, as you say, there is no way to emulate this. On the other hand, >this is done so rarely as to be tolerated the way it is. Do you really >want to muck up the language with rarely used constructs? > >As a side issue, routines requiring varargs are frowned on anyway. This is probably a question of varargs' role more than anything else. I find varargs useful, and therefor use it. When I do, I find the restriction that the user know about argument type promotion annoying, especially since the compiler knows about type promotion already. Apparently, you find varargs a kludge (you frown on it), and so label an enhancement to C that would generalize variable argument parsing "mucking up" the language. Presumably, since varargs is being standardized (as stdarg), the X3J11 committee finds it to be a feature and not a kludge. In that case, now is the time to generalize the stdarg interface, and that requires (a) new operator(s) in C. -- ------------- Brett Galloway {pesnta,twg,ios,qubix,turtlevax,tymix,vecpyr,certes,isi}!wjvax!brett