From c99acdd6792e475c8410105611f1b463b4144c78 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 6 May 2022 12:46:24 +0200 Subject: [PATCH] Disable bogus warning with g++: add -Wno-free-nonheap-object. Build fails on mc_dwarf.cpp with g++ 12.0.1. This kind of error should be caught by valgrind and/or ASan anyway. --- tools/cmake/Flags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cmake/Flags.cmake b/tools/cmake/Flags.cmake index 3741f5f533..d84df86e0c 100644 --- a/tools/cmake/Flags.cmake +++ b/tools/cmake/Flags.cmake @@ -34,7 +34,7 @@ if(enable_compile_warnings) set(warnCXXFLAGS "${warnCFLAGS} -Wall -Wextra -Wunused -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing") if(CMAKE_COMPILER_IS_GNUCXX) - set(warnCXXFLAGS "${warnCXXFLAGS} -Wclobbered -Wformat-signedness -Wno-error=clobbered -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized") + set(warnCXXFLAGS "${warnCXXFLAGS} -Wclobbered -Wformat-signedness -Wno-error=clobbered -Wno-free-nonheap-object -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized") endif() if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0") # workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81767 -- 2.20.1