Subject: Re: va_list pointers, bad(?) gcc code
To: Michal Ludvig <>
From: Valeriy E. Ushakov <>
List: port-amd64
Date: 11/11/2003 14:56:22
On Tue, Nov 11, 2003 at 12:49:12 +0100, Michal Ludvig wrote:

> ---- Jan Hubicka wrote:
> The code is illegal.  It is not allowed to take address of va_list type.

C9x, 7.15, #3.  In particular, see the footnote:

                                    ... The object ap may be passed
       as an argument to another function; if that function invokes
       the  va_arg  macro with parameter ap, the value of ap in the
       calling function is indeterminate and shall be passed to the
       va_end macro prior to any further reference to ap.

      212 It is permitted to create a pointer to a va_list and pass
          that pointer to  another  function,  in  which  case  the
          original  function  may  make further use of the original
          list after the other function returns.

SY, Uwe
--                         |       Zu Grunde kommen            |       Ist zu Grunde gehen