Opened 5 years ago

Closed 5 months ago

#6988 closed defect (fixed)

COMPILER: --enable-c++11 breaks compilation in commandline.cpp (AmigaOS4)

Reported by: raziel- Owned by: sev-
Priority: normal Component: Port: AmigaOS4
Keywords: Cc:

Description (last modified by raziel-)

Using the flag


with configure, makes the compiler error early in commandline.cpp.

    C++      base/commandLine.o
	base/commandLine.cpp: In function 'void Base::usage(const char*, ...)':
base/commandLine.cpp:162:36: error: 'vsnprintf' was not declared in this scope
      vsnprintf(buf, STRINGBUFLEN, s, va);
	gmake: *** [base/commandLine.o] Error 1

The same (or at least something similar) happens when using the flag


on a test program.

#include <stdio.h>
#include <stdarg.h>
void test() { va_list ap; vsnprintf(0, 0, 0, ap); }

Building it with

g++ -c -o test.o test.cpp

works fine, but adding the c++11 flag and using

g++ -c -o test.o test.cpp -std=c++11

throws this error

test.cpp: In function 'void test()':
test.cpp:5:48: error: 'vsnprintf' was not declared in this scope
 void test() { va_list ap; vsnprintf(0, 0, 0, ap); }

AmigaOS4 - PPC - SDL - BE
GCC (adtools build 5.3.0) 5.3.0

Ticket imported from: bugs/6988.

Change History (9)

comment:1 by lordhoto, 5 years ago

Summary: COMPILER: Using --enable-c++11 breaks in commandline.cppAMIGAOS4: --enable-c++11 breaks compilation of commandline.cpp

comment:2 by lordhoto, 5 years ago

Looks like a broken toolchain. vsnprintf is part of C++11 (see:

You might need to update your C library's development headers.

comment:3 by raziel-, 5 years ago

Not broken, it seems it's not yet supported:

Probably can be closed then

comment:4 by csnover, 3 years ago

Component: Ports
Owner: set to csnover

In the upgraded Buildbot, I plan on enabling all platforms to build with C++11 by default soon, so whatever needs to be fixed for this to be fixed will be addressed at that point.

comment:5 by raziel-, 3 years ago

I don't really think that there si anything that needs "fixing", more a case of "supporting".

It seems the c++11 is simply not yet implemented in out adtools.

But anyway, thanks alot for taking a look

comment:6 by digitall, 2 years ago

Owner: csnover removed

comment:7 by digitall, 2 years ago

Component: PortsPort: AmigaOS4

comment:8 by raziel-, 5 months ago

Summary: AMIGAOS4: --enable-c++11 breaks compilation of commandline.cppCOMPILER: --enable-c++11 breaks compilation of commandline.cpp (AmigaOS4)

comment:9 by raziel-, 5 months ago

Description: modified (diff)
Owner: set to sev-
Resolution: fixed
Status: newclosed
Summary: COMPILER: --enable-c++11 breaks compilation of commandline.cpp (AmigaOS4)COMPILER: --enable-c++11 breaks compilation in commandline.cpp (AmigaOS4)
Note: See TracTickets for help on using tickets.