Subject: Re: va_list pointers, bad(?) gcc code
To: Frank van der Linden <>
From: Michal Ludvig <>
List: port-amd64
Date: 11/11/2003 11:03:25
Frank van der Linden told me that:

> (no include files used to make it OS
> independent):

That might be the problem. Try to replace

> #define va_list __builtin_va_list
> #define va_start __builtin_va_start
> #define va_arg __builtin_va_arg
> #define va_end __builtin_va_end


#include <stdarg.h>


> void
> vfoo1(const char *a, va_list l)
> {
> 	vfoo2(a, &l);
> }


vfoo1(const char *a, va_list l)
         va_list l2;
         va_copy (l2, l);
         vfoo2(a, &l2);

Now it should work...

Michal Ludvig
sUsE cR, s.R.o    | Cray is the only computer
(+420) 296.545.373 | that runs an endless loop
Personal homepage | in just four hours.