From: Jeff King Date: Thu, 20 Sep 2007 16:10:07 GMT Subject: Re: [PATCH 1/5] strbuf API additions and enhancements. Message-ID: <20070920161007.GA22876@sigill.intra.peff.net> In-Reply-To: <87lkb1iz0i.fsf@Astalo.kon.iki.fi> On Thu, Sep 20, 2007 at 10:20:29AM +0300, Kalle Olavi Niemitalo wrote: > Normative text in 7.15p3 confirms this: "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." > > Therefore va_copy is needed here, at least in principle. Not just in principle; a few months ago, I ran afoul of the same issue using gcc + glibc6, so it is a real problem for our target platforms (sorry, I don't have a test case anymore, but I recall getting undefined-ish behavior from my print statements). -Peff