src: enable -Wsuggest-override in src/conf.h
This commit is contained in:
+9
-3
@@ -83,14 +83,20 @@ ACC_COMPILE_TIME_ASSERT_HEADER(CHAR_MAX == 255) // -funsigned-char
|
||||
ACC_COMPILE_TIME_ASSERT_HEADER((char)(-1) == 255) // -funsigned-char
|
||||
|
||||
// enable/disable some warnings
|
||||
#if (ACC_CC_CLANG >= 0x0b0000)
|
||||
# pragma clang diagnostic error "-Wsuggest-override"
|
||||
#elif (ACC_CC_GNUC >= 0x0a0000)
|
||||
// don't enable before gcc-10 because of gcc bug #78010
|
||||
# pragma GCC diagnostic error "-Wsuggest-override"
|
||||
#endif
|
||||
// Some non-GLIBC toolchains do not use 'nullptr' everywhere when C++:
|
||||
// openwrt-sdk-x86-64_gcc-11.2.0_musl.Linux-x86_64/staging_dir/
|
||||
// toolchain-x86_64_gcc-11.2.0_musl/include/fortify/stdlib.h:
|
||||
// 51:32: error: zero as null pointer constant
|
||||
#if (ACC_CC_GNUC >= 0x040700) && defined(__GLIBC__)
|
||||
# pragma GCC diagnostic error "-Wzero-as-null-pointer-constant"
|
||||
#elif (ACC_CC_CLANG >= 0x050000ul)
|
||||
#if (ACC_CC_CLANG >= 0x050000)
|
||||
# pragma clang diagnostic error "-Wzero-as-null-pointer-constant"
|
||||
#elif (ACC_CC_GNUC >= 0x040700) && defined(__GLIBC__)
|
||||
# pragma GCC diagnostic error "-Wzero-as-null-pointer-constant"
|
||||
#endif
|
||||
|
||||
#if (ACC_CC_MSC)
|
||||
|
||||
Reference in New Issue
Block a user