[net.lang.c] Include the va_end!

see@NTA-VAX.ARPA (Stein-Erik Engbr}ten) (04/29/86)

In message <5336@alice.uUCp> Andrew Koenig (<ark@alice.uucp>)
writes:

>> I assume va_start be done in the original function.  (Dito the first
>> va_alist comment.)  Does va_end have to be done in the original
>> function also?  (va_end does nothing in my implementation.)
>
>It should be.  (va_end does nothing in every implementation I've seen)

I have found an implementation which needs the va_end. It caused
me a great deal of trouble - the source I was compiling (the 
SYSTEM_V source for curses!) had left out the va_end ("It doesn't
do anything, so why bother...").

The implementation is on the Pyramid 90x machine, the System V
part of it (it runs both 4.2 and System V at the same time!), 
where va_end is defined to be an '}'.

So please, everybody - even if 'nobody' defines the va_end,
include it all the same!

Stein-Erik Engbr}ten

ark@alice.UucP (Andrew Koenig) (05/02/86)

> The implementation is on the Pyramid 90x machine, the System V
> part of it (it runs both 4.2 and System V at the same time!), 
> where va_end is defined to be an '}'.

That implementation is simply wrong.  va_end is intended to be
executed (to free memory possibly acquired by va_start).  It
is **not** intended to be a syntactic entity.