Changes between Initial Version and Version 9 of Ticket #6988


Ignore:
Timestamp:
Jul 10, 2020, 11:30:59 AM (4 years ago)
Author:
raziel-
Comment:

Fixed by https://github.com/scummvm/scummvm/commit/a7a11c3fde915ff5c203f13ded8b553610d5a928

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6988

    • Property Summary COMPILER: Using --enable-c++11 breaks in commandline.cppCOMPILER: --enable-c++11 breaks compilation in commandline.cpp (AmigaOS4)
    • Property ComponentPort: AmigaOS4
    • Property Owner set to sev-
    • Property Resolutionfixed
    • Property Status newclosed
  • Ticket #6988 – Description

    initial v9  
    1 {{{#!Markdown
    2 Using the flag --enable-c++11 with configure makes the compiler break with an error early on in commandline.cpp.
    3 
     1Using the flag
     2{{{
     3--enable-c++11
     4}}}
     5with configure, makes the compiler error early in commandline.cpp.
     6{{{
    47    C++      base/commandLine.o
    58        base/commandLine.cpp: In function 'void Base::usage(const char*, ...)':
    6         base/commandLine.cpp:162:36: error: 'vsnprintf' was not declared in this scope
     9base/commandLine.cpp:162:36: error: 'vsnprintf' was not declared in this scope
    710      vsnprintf(buf, STRINGBUFLEN, s, va);
    811                                      ^
    912        gmake: *** [base/commandLine.o] Error 1
    10 
    11 The same (or at least something similar) happens when using the flag -std=c++11
    12  on a test program.
    13 
     13}}}
     14The same (or at least something similar) happens when using the flag
     15{{{
     16-std=c++11
     17}}}
     18on a test program.
     19{{{
    1420#include <stdio.h>
    1521#include <stdarg.h>
    1622void test() { va_list ap; vsnprintf(0, 0, 0, ap); }
    17 
     23}}}
    1824Building it with
    19 g++ -c -o test.o test.cpp works fine, but adding the c++11 flag and using
    20 g++ -c -o test.o test.cpp -std=c++11 throws this error
    21 
     25{{{
     26g++ -c -o test.o test.cpp
     27}}}
     28works fine, but adding the c++11 flag and using
     29{{{
     30g++ -c -o test.o test.cpp -std=c++11
     31}}}
     32throws this error
     33{{{
    2234test.cpp: In function 'void test()':
    2335test.cpp:5:48: error: 'vsnprintf' was not declared in this scope
    2436 void test() { va_list ap; vsnprintf(0, 0, 0, ap); }
    2537                                                ^
    26 
     38}}}
    2739AmigaOS4 - PPC - SDL - BE
    2840GCC (adtools build 5.3.0) 5.3.0
    29 }}}
     41
    3042{{{#!div style="font-size: 75%"
    3143Ticket imported from: bugs/6988.