Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!agate!bionet!csd4.milw.wisc.edu!nic.MR.NET!umn-d-ub!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: `va_dcl' macro question Message-ID: <9507@smoke.BRL.MIL> Date: 26 Jan 89 22:41:11 GMT References: <1964@kappl.cs.vu.nl> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 19 In article <1964@kappl.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: >Anybody got an example (of some weird architecture) to show why it has been >decided that no semicolon shall follow `va_dcl'? No, but it's always been that way and nobody is going to change it now. > int printf(fmt, va_alist) > char *fmt; > va_dcl; > { > ... > } Apart from the question of the semicolon, this is wrong anyway. It's not permissible to mix fixed parameter declarations with the va_alist. va_alist must stand alone as the only parameter, with known parameters then being fetched from it via va_arg. This of course applies only to varargs; in ANSI C, one has at least one fixed parameter and uses the ,... notation.