Skip to content

Commit

Permalink
cmake: suppressed Wfree-noheap-object warning for GCC 14+
Browse files Browse the repository at this point in the history
  • Loading branch information
vpirogov committed Nov 25, 2024
1 parent c213b84 commit 5ee6679
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions cmake/platform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,19 @@ 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 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 9.0)
# suppress false positive warnings with 9.x+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96963
if(${gnu_version} VERSION_EQUAL 0.0 OR ${gnu_version} VERSION_GREATER 9.0)
append(${var} "-Wno-stringop-overflow")
append(${var} "-Wno-array-bounds")
endif()
# suppress false positive warning with GCC 14
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115048
if(${gnu_version} VERSION_EQUAL 0.0 OR ${gnu_version} VERSION_GREATER 14.0)
append(${var} "-Wno-free-nonheap-object")
endif()
endmacro()

macro(platform_clang_nowarn_ccxx_flags var)
Expand Down

0 comments on commit 5ee6679

Please sign in to comment.