Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Disable bogus warning with g++: add -Wno-free-nonheap-object.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 6 May 2022 10:46:24 +0000 (12:46 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 6 May 2022 10:51:11 +0000 (12:51 +0200)
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

index 3741f5f..d84df86 100644 (file)
@@ -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