This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/14557] va_list is automatically taken address-of when passed as argument
- From: "hueffner at informatik dot uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2004 13:28:43 -0000
- Subject: [Bug target/14557] va_list is automatically taken address-of when passed as argument
- References: <20040312161718.14557.olof.lindholm@bea.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From hueffner at informatik dot uni-tuebingen dot de 2004-03-13 13:28 -------
Subject: Re: va_list is automatically taken address-of
when passed as argument
"jsm at polyomino dot org dot uk" <gcc-bugzilla@gcc.gnu.org> writes:
> ------- Additional Comments From jsm at polyomino dot org dot uk 2004-03-13 13:22 -------
> There's nothing wrong with using va_list *, the only problem is when
> taking the address of a parameter to do so.
>
> With a variable
>
> va_list ap;
>
> you use &ap to take the address.
>
> With a parameter (subject to array-to-pointer adjustment)
>
> va_list ap
>
> you use &ap if va_list is not an array type, but ap if it is an
> array type.
Ah, I see. Thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14557