Article View: comp.std.c
Article #27Re: stdarg facility, va_start more than once?
From: Paul Schlyter
Date: Thu, 29 Oct 1992 08:23
Date: Thu, 29 Oct 1992 08:23
27 lines
1486 bytes
1486 bytes
In article <2176@sdrc.COM> scjones@thor.sdrc.com (Larry Jones) writes: >In article <MGK.92Oct27155222@cedar.sql.sybase.com>, mgk@sql.sybase.com (Michael Keirnan aka Joe Cool) writes: >> Is using the macro va_start more than once in a function legal in >> ANSI C? > >Yes, there's no prohibition against invocing va_start more than once. >What's more, there are a number of allusions to the fact that it is >intended to be usable that way; for example, 4.8.1.3 The va_end Macro >says: > > The va_end macro may modify ap so that it is no longer usable > (without an intervening invocation of va_start). Which brings up the next question: is it legal to invoke va_start more than once in the same function, without an invocation of va_end in between? There are many implementations where this is ok (and where, by the way, va_end expands to an empty macro) -- but is it generally legal? -- --- Paul Schlyter, Swedish Amateur Astronomer's Society (SAAF) Nybrogatan 75 A, 6 tr, S-114 40 Stockholm, Sweden InterNet: pausch@saaf.se
Technical Details
Message-ID:
<1992Oct29.082319.7188@saaf.se>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!nobeltech!admin.kth.se!saaf.se!pauschReferences:
<MGK.92Oct27155222@cedar.sql.sybase.com> <2176@sdrc.COM>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!nobeltech!admin.kth.se!saaf.se!pausch From: pausch@saaf.se (Paul Schlyter) Subject: Re: stdarg facility, va_start more than once? Message-ID: <1992Oct29.082319.7188@saaf.se> Organization: SAAF, Svensk Amat|rAstronomisk F|rening References: <MGK.92Oct27155222@cedar.sql.sybase.com> <2176@sdrc.COM> Distribution: comp Date: Thu, 29 Oct 92 08:23:19 GMT Lines: 27