This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/14557] va_list is automatically taken address-of when passed as argument


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]