Bootstrap failure (Re: [Patch] Java: Prepare for %q, %< and %> in diagnostic messages)

Zack Weinberg zack@codesourcery.com
Wed Oct 6 13:45:00 GMT 2004


Andrew Haley <aph@redhat.com> writes:

>  > Uh, can you do this?  Take an address of a va_list object?
>
> It says in 7.15 "va_list is an object type".  So, you can take its
> address and later dereference to get an lvalue that is a va_list.
>
>  > Wouldn't it be more "correct" to have text.args_ptr be of type
>  > va_list and use va_copy instead?
>
> That does sound like a better idea, yes.

We can't count on having va_copy, it's only in C99.

Taking the address of the va_list *in the function that called
va_start*, passing that around, and dereferencing the pointer only
as an immediate operand of va_arg, that works reliably.

Passing the va_list around by value does not work reliably.

zw



More information about the Java-patches mailing list