diff --git a/cmake/platform.cmake b/cmake/platform.cmake index fc8a7c13e35..f31ec7cdda8 100644 --- a/cmake/platform.cmake +++ b/cmake/platform.cmake @@ -78,11 +78,12 @@ macro(platform_gnu_nowarn_ccxx_flags var gnu_version) append(${var} "-Wno-strict-overflow") # suppress false positive warnings about uninitialized variables append(${var} "-Wno-maybe-uninitialized") - # suppress false positive warnings with 10.x: GCC Bugzilla – Bug 96963 + # suppress false positive warnings with 9.x+: GCC Bugzilla – Bug 96963 # assume 0.0 is unknown version - always suppress the warning if(${gnu_version} VERSION_EQUAL 0.0 OR - (${gnu_version} VERSION_GREATER 10.0 AND ${gnu_version} VERSION_LESS 11.0)) + ${gnu_version} VERSION_GREATER 9.0) append(${var} "-Wno-stringop-overflow") + append(${var} "-Wno-array-bounds") endif() endmacro() diff --git a/src/common/compiler_workarounds.hpp b/src/common/compiler_workarounds.hpp index 17beeb84b72..41b6c193fd5 100644 --- a/src/common/compiler_workarounds.hpp +++ b/src/common/compiler_workarounds.hpp @@ -63,14 +63,6 @@ #define GCC_WA_NO_TREE_DOMINATOR_OPTS 0 #endif -// Workaround 04: GCC -// -// GCC 10 & 11 && 12 (at least versiona 10.1, 10.3 & 11.1, 12.2) report false positives -// in xbyak when -Warray-bounds build setting is on -#if (defined NEED_GCC_WA_CHECK) && (__GNUC__ >= 10) -#pragma GCC diagnostic ignored "-Warray-bounds" -#endif - // Workaround 05: GCC // // NOTE: inside lambda, type cast variables captured by reference using