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: "zlomek at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2004 06:10:35 -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 zlomek at gcc dot gnu dot org 2004-03-13 06:10 -------
AFAIK it is incorrect to use "va_list *" so the code is wrong.
va_list is allowed to be something different that a pointer, for example
on ppc64 and x86-64 it is an one element array (builtin type).
Arrays are always passed as a pointer to the first element so there is no
performance penalty.
AFAIK using "&marker" where marker is va_list is wrong too.
See the discussion when we were fixing vasprintf.c from libiberty
http://gcc.gnu.org/ml/gcc-patches/2003-10/msg00219.html
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |jh at suse dot cz
Status|ASSIGNED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14557