va_list has not been declared

When compiling some working code on Fedora 11, I am getting this error:

/usr/include/c++/4.4.1/cstdarg:56: error: ‘::va_list’ has not been declared

I am using:
[doriad@davedesktop VTK]$ g++ --version
g++ (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2)

Does anyone know what the problem could be?

Thanks,

Dave
Isn't va_list a macro? How have you used it in your code?
I haven't used it at all (directly). It looks like it is getting included by some other "core" files:

In file included from /usr/include/c++/4.4.1/tr1/cstdarg:32,
from /usr/include/stdarg.h:32,
from /usr/include/wchar.h:40,
from /usr/include/c++/4.4.1/cwchar:47,
from /usr/include/c++/4.4.1/bits/postypes.h:42,
from /usr/include/c++/4.4.1/bits/char_traits.h:42,
from /usr/include/c++/4.4.1/string:42,
/usr/include/c++/4.4.1/cstdarg:56: error: ‘::va_list’ has not been declared
My g++, (GCC) 4.3.4 20090804 (release) 1, implements it as a macro. I don't have access to a RHL installation.

Are you able to produce a minimal program that reproduces the problem? Something's probably forward declared it instead of using stdarg.h or something like that.
This produces the error:
#include <iostream>

int main()
{

return 0;
}

While this does not:

int main()
{

return 0;
}
Well of course the second one doesn't... it couldn't. It doesn't include any header files and doesn't use va_list.
What's your g++ command line? There's some macro magic going on, but I need to see what's defined.
Well in Linux va_list is typedef'd from a char*. It might not be anything to do with macros.
Topic archived. No new replies allowed.