This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Bug 20375 - ia64 varadic regression
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Andrew Pinski'" <pinskia at physics dot uc dot edu>,"'Nathan Sidwell'" <nathan at codesourcery dot com>
- Cc: "'Joseph S. Myers'" <joseph at codesourcery dot com>,"'Richard Henderson'" <rth at redhat dot com>,"'gcc'" <gcc at gcc dot gnu dot org>
- Date: Tue, 8 Mar 2005 17:30:41 -0000
- Subject: RE: Bug 20375 - ia64 varadic regression
----Original Message----
>From: Andrew Pinski
>Sent: 08 March 2005 16:13
> On Mar 8, 2005, at 10:59 AM, Nathan Sidwell wrote:
>
>> Bug 20375 is logged as a C++ bug, but it is a middle end
>> bug that cannot be expressed in C. Here's a reduced testcase
>>
>> union U
>> {
>> void *m[7];
>> };
>>
>> struct C;
>>
>> void f(struct C *c, float f, union U, ...)
>> { }
>
> I almost want to say this is undefined as there is no way to get
> at the varaidic arguments.
>
>
> -- Pinski
There was under varargs, which didn't require to pass a named argument to
va_start; it's only with stdargs that it would be impossible.
I suspect that this is the underlying reason for the code having developed
this way: sometimes the first variadic arg is the last named arg (stdargs),
sometimes it is the first arg _after_ the last named arg.
cheers,
DaveK
--
Can't think of a witty .sigline today....