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 8fcabc5
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions cmake/platform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,20 @@ 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)
append(${var} "-Wno-stringop-overflow")
append(${var} "-Wno-array-bounds")
if(${gnu_version} VERSION_EQUAL 0.0)
# suppress false positive warnings with 9.x+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96963
if(${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_GREATER 14.0)
append(${var} "-Wno-free-nonheap-object")
endif()
endif()
endmacro()

Expand Down

0 comments on commit 8fcabc5

Please sign in to comment.