Skip to content

Commit

Permalink
cmake: ignore GCC specific flags that produce false-positives
Browse files Browse the repository at this point in the history
Change-Id: I1d9e0700dc2a5473f1f64fdf187c614f7f2e5f21
  • Loading branch information
dzarukin authored and mgouicem committed Dec 4, 2024
1 parent 53f7321 commit dc780cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
5 changes: 3 additions & 2 deletions cmake/platform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
8 changes: 0 additions & 8 deletions src/common/compiler_workarounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dc780cb

Please sign in to comment.