Start using some C++ 14 features.
This commit is contained in:
+7
-2
@@ -65,11 +65,16 @@
|
||||
# error "UINT_MAX"
|
||||
#endif
|
||||
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 4)
|
||||
ACC_COMPILE_TIME_ASSERT_HEADER(-1 == ~0) // two's complement - see http://wg21.link/P0907R4
|
||||
ACC_COMPILE_TIME_ASSERT_HEADER(0u-1 == ~0u) // two's complement - see http://wg21.link/P0907R4
|
||||
ACC_COMPILE_TIME_ASSERT_HEADER((1u << 31) << 1 == 0)
|
||||
ACC_COMPILE_TIME_ASSERT_HEADER(((int)(1u << 31)) >> 31 == -1) // arithmetic right shift
|
||||
ACC_COMPILE_TIME_ASSERT_HEADER(CHAR_MAX == 255) // -funsigned-char
|
||||
ACC_COMPILE_TIME_ASSERT_HEADER((char)(-1) > 0) // -funsigned-char
|
||||
|
||||
#if (ACC_CC_GNUC >= 0x040700)
|
||||
# pragma GCC diagnostic error "-Wzero-as-null-pointer-constant"
|
||||
#endif
|
||||
#if (ACC_CC_MSC)
|
||||
# pragma warning(error: 4127)
|
||||
# pragma warning(error: 4146)
|
||||
@@ -585,7 +590,7 @@ struct upx_compress_config_t
|
||||
void reset() { conf_lzma.reset(); conf_ucl.reset(); conf_zlib.reset(); }
|
||||
};
|
||||
|
||||
#define NULL_cconf ((upx_compress_config_t *) NULL)
|
||||
#define NULL_cconf ((upx_compress_config_t *) nullptr)
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -670,7 +675,7 @@ void e_exit(int ec);
|
||||
|
||||
// msg.cpp
|
||||
void printSetNl(int need_nl);
|
||||
void printClearLine(FILE *f = NULL);
|
||||
void printClearLine(FILE *f = nullptr);
|
||||
void printErr(const char *iname, const Throwable *e);
|
||||
void printUnhandledException(const char *iname, const std::exception *e);
|
||||
#if (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
|
||||
|
||||
Reference in New Issue
Block a user