This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada in gcc-3.4.3 on x86_64
* Robert Dewar:
> Florian Weimer wrote:
>
>> No, There are two possible variadic declarations for printf in this
>> case:
>> void printf (char *, ...);
>> and void printf (char *, int, ...);
>
> Is this really a problem in practice. If so, I completely withdraw
> the suggestion, it's too messy to distinguish these cases.
Oh, I already feel sorry for bringing this up.
Unfortunately, I don't know a lot of microprocessor ABIs, so I'm not
sure if it's a practical problem.
> Actually, there must be a third one
>
> void printf (...);
>
> no?
No, this is a syntax error. You couldn't use <stdarg.h> to access the
parameters anyway because the name of the last parameter before the
ellipsis is required. (This is C99, previous C version might have been
different.)
Maybe you intended to write an old-style function declaration?
void printf ();
In general, this activates yet another calling convention (which
involves default argument promotion), but it doesn't make a difference
in this case.