Date: | Sat, 29 Apr 2006 16:42:00 +0300 |
From: | Diomidis Spinellis <dds@aueb.gr> |
Organization: | Athens University of Economics and Business |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060404 SeaMonkey/1.0.1 |
MIME-Version: | 1.0 |
Newsgroups: | comp.lang.c |
Subject: | Re: variadic without va_arg |
References: | <1146294990.717129.8650@j33g2000cwa.googlegroups.com> <e2v8b7$bva$1@volcano1.grnet.gr> <1146300616.778216.321570@i39g2000cwa.googlegroups.com> |
In-Reply-To: | <1146300616.778216.321570@i39g2000cwa.googlegroups.com> |
Content-Type: | text/plain; charset=ISO-8859-1; format=flowed |
Content-Transfer-Encoding: | 7bit |
Bill Pursell wrote: > Diomidis Spinellis wrote: >> Bill Pursell wrote: >>> I don't particularly enjoy using the va_start macro family, and I've >>> noticed that the following code works. I'm a little concerned about >>> the fact that the prototypes for foo do not match. Is this safe? [...] > Would it be portable to simply change the prototypes so that the caller > has the interface: > extern int foo(int num, ...) > while the definition of the function gets: > int foo(int num, int a, int b, int c, ...)? > > That seems to satisfy the section of the standard you quote above, but > it still feels wrong. Still wrong; see Michael Mair's reply to your original post.