Uzebox / uzebox

A retro-minimalist game console engine for the ATMega644
http://uzebox.org
128 stars 43 forks source link

uzem: explicity define the c++ standard to support gcc 6 #67

Closed flaviozavan closed 7 years ago

flaviozavan commented 7 years ago

As discussed here: http://uzebox.org/forums/viewtopic.php?f=6&t=2411&p=18193#p18193

GCC 6 uses c++14 as default and uzem fails to compile as it's written in c++98

artcfox commented 7 years ago

It's easier to just make it C++14 compatible.

diff --git a/tools/uzem/gdbserver.h b/tools/uzem/gdbserver.h
index 1b80f3f..76e1e89 100644
--- a/tools/uzem/gdbserver.h
+++ b/tools/uzem/gdbserver.h
@@ -67,7 +67,7 @@ class Breakpoints: public vector<dword> {
#define GET_BIG_ENDIAN16(byte1,byte2)          ((byte2 << 8) | byte1)

#ifdef USE_GDBSERVER_DEBUG
-       #define gdb_debug(fmt,...)      fprintf(stderr,"[GDB] "fmt, ##__VA_ARGS__)
+       #define gdb_debug(fmt,...)      fprintf(stderr,"[GDB] "/**/fmt, ##__VA_ARGS__)
#else
        #define gdb_debug(fmt,...)
#endif
artcfox commented 7 years ago

I committed the changes to make it C++14 compatible