the mangling of 'va_list' has changed in GCC 4.4

support for the ARM toolchain
Post Reply
bpoint
Posts: 19
Joined: Wed Nov 07, 2007 4:03 pm
Location: Tokyo, Japan
Contact:

the mangling of 'va_list' has changed in GCC 4.4

Post by bpoint » 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:

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!

bpoint
Posts: 19
Joined: Wed Nov 07, 2007 4:03 pm
Location: Tokyo, Japan
Contact:

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

Post by bpoint » Thu May 28, 2009 12:52 pm

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!

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

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

Post by WinterMute » Thu Jun 11, 2009 12:35 am

I'll have a look at this for devkitARM r27, it's likely to be newlib related.
Help keep devkitPro toolchains free, Donate today

Personal Blog

bpoint
Posts: 19
Joined: Wed Nov 07, 2007 4:03 pm
Location: Tokyo, Japan
Contact:

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

Post by bpoint » Thu Jun 11, 2009 4:01 am

Great, thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests