Thanks for the pointer. I was able to use a __va_copy(dst,src) instead of
the more direct approach dst = src.

However, I would like to comment on this problem. I am not certain that this
is related to the topics on this list, but this problem living on Linux PPC,
and my version of Linux installed being only Debian, I decided to post here.
Feel free to send me a pointer if you know of any.

The compiler error came to a surprise to me, because I used to compile the
code on Darwin PPC and never got this error reported. I went to look closer
at the gcc includes on Darwin and found that there is an extra section in
the va-ppc.h that has been added for AIX and APPLE OSs, perhaps to makes
things a little bit more compatible with other *nix flavors (i.e. va_list
ap, rap; ap = rap won't complain.) It seems that Apple in their version of
gcc given with Darwin, has added the patch for va-ppc.h (to be really
accurate, it seems more like they added an || defined (__APPLE__) after the
defined(_AIX) in this file, ending up to the same result.)

My question is: shouldn't the GCC compiler that comes with Linux (Debian)
PPC integrate this changes too? Running under APPLE, AIX, or LINUX on PPC,
shouldn't we all be using the same headers for one architecture? The ABI is
pervasive among all OSs running on the PowerPC (as far as using the GNU
tools anyway.)

IANAL, but it would seem that GCC is covered under LGPL in the first place,
and that should take care of licensing issues obviously associated with
Apple Darwin or AIX (I have my suspicion that the code started from the GNU
community originally anyway.)

Thanks for letting me know,


Laurent


> From: Michael Schmitz <[EMAIL PROTECTED]>
> Date: Mon, 24 Sep 2001 12:04:55 +0200 (CEST)
> To: Laurent de Segur <[EMAIL PROTECTED]>
> Cc: <debian-powerpc@lists.debian.org>
> Subject: Re: Problem compiling code with va_list assignment
> Resent-From: debian-powerpc@lists.debian.org
> 
>> Basically, I have a c++ class with a field variable declared as
>> 
>> Class Foo {
>> protected:
>> va_list ap;
>> 
>> ...
>> 
>> public:
>> setVaArgs(va_list rap) {
>> ap = rap;
>> }
>> }
> 
> Please take a long look at va-ppc.h in the /usr/lib/gcc-lib/.../include/
> directory. That, together with a quick search of the list archives, should
> explain it.
> Hint: pay attention to the data type for va_list, and compare this with
> other archs. Also compare the defs for __va_copy.
> 
> Michael
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 
> 

Reply via email to