Subject: Re: libstash problems
To: None <mcmahill@mtl.mit.edu>
From: Robert Elz <kre@munnari.OZ.AU>
List: port-sparc
Date: 08/23/2000 05:11:42
I doubt that port-sparc is the right list for this...
I don't think you can rationally take the address of a va_arg(),
it is a meaningless operation (though might get by on some compilers
due to the way they implement va_arg()).
What on earth is the code trying to do that it needs to take the address
of an an arg in a variable arg list? It seems horribly broken. It does
no-one any good to change the value of an arg - they're passed by value,
so no-one will see the change, other than inside the current procedure,
and if that's all that's needed, copy the arg into a local var, and take
its address instead.
On the other hand, if the code is then going to attempt to use pointer
arithmetic to find other args, it has no hope at all - avoiding that kind
of nonsense is what the varargs stuff is all about.
kre