(Answer) (Category) Linux on PowerPC FAQ-O-Matic : (Category) Languages and Compilers :
Can't assign to va_list's (C/C++)
If you're having problems with assignment's of
va_list's to va_list's, the reason is probably
because PowerPC linux'es like to make the va_list
an array.  GCC will throw out an error
like "incompatible types in assignment" if you
try to do such an assignment.  The solution is
to replace something that looks like this:

     va_list ap_one; va_list ap_two;
     /*** ... ***/
     ap_two = ap_one;
     va_list ap_one; va_list ap_two;
     /*** ... ***/
    memcpy( ap_two, ap_one, sizeof(va_list) );_
-David (dtm@waterw.com)
If you're using a later version of gcc (egcs anything, or gcc 2.8.x),
you can just use

__va_copy(ap_two, ap_one);

which is portable (any machine running gcc :-) ) and copies ap_one to ap_two.
Something much like it will be in the next revision of the ISO C standard.
[Append to This Answer]
Previous: (Answer) Qt - how to compile for MkLinux?
Next: (Answer) Where can I find a copy of the powerpc ELF ABI, register usage and calling conventions?
This document is: http://www.jonh.net/cgi-bin/lppcfom/fom?file=154
[Search] [Appearance]
This is a Faq-O-Matic 2.717d.
Hosted by anduin.org and SourceForge Logo