gcc 3.2.1 error when invoking __va_copy with const argument
From: Sriram (sriramkumar_at_yahoo.com)
Date: 08/26/03
- Next message: Griff Miller II: "Yamaha 6416S cdrecord -dao hangs with "Sending CUE ***""
- Previous message: Dave: "Re: iBook with OS X for Linux user?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Aug 2003 00:35:16 -0700
Hello folks,
I have run into a gcc 3.2.1 error with __va_copy on the PPC
architecture. I realize that va_list is defined differently on PPC;
this code used to work with gcc 2.95.3 but it doesn't anymore.
Here's my test program, valist.c:
#include <varargs.h>
class A
{
public:
A(){}
A(const A&rhs)
{
__va_copy(ap, rhs.ap);
}
private:
va_list ap;
};
int main(int argc, char *argv[])
{
return 0;
}
The error is:
valist.c: In copy constructor `A::A(const A&)':
valist.c:9: invalid conversion from `const __va_list_tag*' to
`__va_list_tag*'
Is the above usage of va_list incorrect? Does it not make sense to
apply the const qualifier to the type va_list?
An explanation is greatly appreciated.
Thanks,
Sriram
- Next message: Griff Miller II: "Yamaha 6416S cdrecord -dao hangs with "Sending CUE ***""
- Previous message: Dave: "Re: iBook with OS X for Linux user?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]