Uzem on newer gccs
Posted: Fri Dec 09, 2016 8:38 pm
GCC 6 uses c++14 as default and uzem fails to compile as it's written in c++98:
Setting -std=gnu++98 allows it to build.
My question is: should we make uzem c++14 conformant or just set -std in the Makefile?
Code: Select all
g++ -c gdbserver.cpp -o Debug/gdbserver.o -I/usr/include/SDL2 -D_REENTRANT -DLINUX -D_GNU_SOURCE=1 -DGUI=1 -DJOY_ANALOG_DEADZONE=8192 -g -MD -MP -MF Debug/gdbserver.d -DUSE_SPI_DEBUG=1 -DUSE_EEPROM_DEBUG=1 -DUSE_GDBSERVER_DEBUG=1
In file included from gdbserver.cpp:36:0:
gdbserver.cpp: In member function 'void GdbServer::exec()':
gdbserver.h:70:44: error: unable to find string literal operator 'operator""fmt' with 'const char [7]', 'long unsigned int' arguments
#define gdb_debug(fmt,...) fprintf(stderr,"[GDB] "fmt, ##__VA_ARGS__)
^
gdbserver.cpp:1347:3: note: in expansion of macro 'gdb_debug'
gdb_debug("Ctr+C issued. PC:0x%04x\n",core->pc*2);
^~~~~~~~~
gdbserver.cpp: In member function 'void GdbServer::SendPosition(int)':
gdbserver.h:70:44: error: unable to find string literal operator 'operator""fmt' with 'const char [7]', 'long unsigned int' arguments
#define gdb_debug(fmt,...) fprintf(stderr,"[GDB] "fmt, ##__VA_ARGS__)
^
gdbserver.cpp:1379:5: note: in expansion of macro 'gdb_debug'
gdb_debug("Sending position [signo:%i]\n",signo);
^~~~~~~~~
My question is: should we make uzem c++14 conformant or just set -std in the Makefile?