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: "jsm at polyomino dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2004 13:22:31 -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 jsm at polyomino dot org dot uk 2004-03-13 13:22 -------
Subject: Re: va_list is automatically taken address-of
when passed as argument
On Sat, 13 Mar 2004, falk dot hueffner at student dot uni-tuebingen dot de wrote:
> I don't see anything wrong with using "va_list *". The standard even says:
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.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14557