[libiberty patch] Fix va_list for PowerPC
Daniel Jacobowitz
drow@mvista.com
Sat Apr 20 15:16:00 GMT 2002
On Sat, Apr 20, 2002 at 11:50:19PM +0200, Andreas Schwab wrote:
> I think the va_copy should rather replace the call to memcpy in
> int_vasprintf (there must also always be a matching va_end in the
> same function). But in any way, va_copy should only be used if
> defined, so that it still works with pre-C99 compilers.
va_end should match va_start, not va_copy. There's no point in ending
the copy, is there?
Also, has either of these patches been tested? I do not believe that
you can necessarily pass a va_list* to a function. The correct
solution would probably look more like:
- change int_vasprintf to take a va_list argument
- add va_copy (temp, args) to vasprintf
- call int_vasprintf (result, format, temp)
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
More information about the Gcc-patches
mailing list