This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ada in gcc-3.4.3 on x86_64


Robert Dewar <dewar@adacore.com> writes:
> Not at all. There are architectures on which the calling sequence for
> an n-adic function, and a variadic function with n arguments are
> radically different. So if you interpret the note to mean that you
> always expect one syntactic form to cover both cases, that's simply
> plain impossible on some architectures, e.g. MIPS/Irix if I remember
> correctly.

You do ;)  But just in case there's any confusion, the distinction is
between named and unnamed (variadic) arguments, not between variadic
and non-variadic _functions_.  So...

Robert Dewar <dewar@adacore.com> writes:
> 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.

...it certainly will be on MIPS.  The number of named arguments before
the "..." does matter.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]