Page 1 of 1

the mangling of 'va_list' has changed in GCC 4.4

Posted: Wed May 20, 2009 12:15 pm
by bpoint
I just upgraded to devkitARM-r26 (from r21), and I'm getting this new note/warning while compiling my code:

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
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:

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);
};
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:

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.
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!

Re: the mangling of 'va_list' has changed in GCC 4.4

Posted: Thu May 28, 2009 12:52 pm
by bpoint
Well, I don't have any real solution yet, but passing -Wno-psabi to gcc while compiling disables the warning.

If anyone has any other (better) ideas, please let me know!

Re: the mangling of 'va_list' has changed in GCC 4.4

Posted: Thu Jun 11, 2009 12:35 am
by WinterMute
I'll have a look at this for devkitARM r27, it's likely to be newlib related.

Re: the mangling of 'va_list' has changed in GCC 4.4

Posted: Thu Jun 11, 2009 4:01 am
by bpoint
Great, thanks!