the mangling of 'va_list' has changed in GCC 4.4
Posted: Wed May 20, 2009 12:15 pm
I just upgraded to devkitARM-r26 (from r21), and I'm getting this new note/warning while compiling my code:
My logging system uses both variable arguments and a va_list to format logging output. Since this file is included by every single file in my engine, I get this message for every file compiled -- a bit annoying to say the least. Here's a portion of the header file in question:
Basically write() wraps up the variable arguments into a va_list and passes it to doWrite().
I did some Googling and found this patch which is causing this note/warning to be displayed. Apparently the ARM EABI changed (PDF available here, see section 7.1.4), and the gcc maintainers decided to improve compliancy, so the patch went in for gcc-4.4. I also noticed this on the gcc-4.4 change list:
The only thing I don't understand is: what's wrong with my code? Aside from this note/warning, it compiles, links, and runs just fine -- and the logger is working properly too. I tried using std::va_list in place of just va_list (as per the new EABI specification), but that didn't seem to have any affect.
Does anyone know what I need to do to get rid of this message? Thanks in advance!
Code: Select all
1>log.cpp
1>In file included from c:/game/include/Types.h:557,
1> from c:/game/src/base/log.cpp(8) :
1>c:/game/include/base/Log.h(78) : note: the mangling of 'va_list' has changed in GCC 4.4
Code: Select all
#include <cstdarg>
class Logger // <- line 78
{
public:
static void write(Level level, const char *func, const char *fmt, ...);
// ...other public functions...
private:
static void doWrite(Level level, const char *func, const char *fmt, va_list args);
};
I did some Googling and found this patch which is causing this note/warning to be displayed. Apparently the ARM EABI changed (PDF available here, see section 7.1.4), and the gcc maintainers decided to improve compliancy, so the patch went in for gcc-4.4. I also noticed this on the gcc-4.4 change list:
Code: Select all
On ARM EABI targets, the C++ mangling of the va_list type has been changed to conform to the current revision of the EABI. This does not affect the libstdc++ library included with GCC.
Does anyone know what I need to do to get rid of this message? Thanks in advance!