Closed MichaelAtSamraksh closed 8 years ago
Perhaps I am being too sanguine about this. Mike, how would you feel if instead of using -std=c++11
we use:
#define _POSIX_C_SOURCE=200809L
(by adding as a -D
option to GCC)
The goal here is to remove extensions we don't use, in particular the BSD stuff. This would have the same effect by limiting to POSIX extensions.
EDIT: One second though, it looks like _ISOC99_SOURCE
would be most appropriate?
I just care about resolving the old build warnings to ensure our code is completely initialized, so I created the ticket. c++11 seems to be fine, I just care about the initialization warnings without c++11.
References: commit 3590e0b25d2872a5590ad487ac56f9d9a1461562 "Use ISO C11 instead of GCC defaults." and issue #428 "PortableArrayKitMessage.cpp does not build in GCC 5.4.1"
While I support staying current, switching to c++11 whisks away some unresolved build warnings about struct variable initializations-- warnings that are emitted when compiling the current Samraksh Emote master branch. I feel that those build warnings should be addressed before we convert to c++11 and forget about them. Safety in paranoia. After the non-c++11 build warnings are addressed, I look forward to using static asserts to write better code.
FYI, here is a quick diff of GCC 4.9.3 build flags triggered by
-std=c++11
:In GCC 4.9.3: Additions:
Changes:
#define __cplusplus 199711L
changes to#define __cplusplus 201103L
Deletions:
#define __GNUC_GNU_INLINE__ 1