]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Disable -Wclass-memaccess for non-CXX17 builds and in bundled boost 6878/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 3 Jul 2018 21:36:35 +0000 (23:36 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 3 Jul 2018 22:22:00 +0000 (00:22 +0200)
bundled/boost-1.62.0/include/boost/container/detail/copy_move_algo.hpp
cmake/setup_compiler_flags_gnu.cmake

index ead93c6035d6410b23645a335968795f86e34274..93573211a97d2a7f8bac484a29437b4686a4e24e 100644 (file)
 // other
 #include <boost/core/no_exceptions_support.hpp>
 // std
-#include <cstring> //for emmove/memcpy
+#include <cstring> //for memmove/memcpy
+
+#if defined(BOOST_GCC) && (BOOST_GCC >= 80000)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wclass-memaccess"
+#endif
 
 namespace boost {
 namespace container {
@@ -1141,4 +1146,9 @@ void move_assign_range_alloc_n( Allocator &a, I inp_start, typename allocator_tr
 }  //namespace container {
 }  //namespace boost {
 
+#if defined(BOOST_GCC) && (BOOST_GCC >= 80000)
+#pragma GCC diagnostic pop
+#endif
+
+
 #endif   //#ifndef BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP
index ba005571e36a1e2f29d96d7e289859cf0954795d..ae5496f6836e637f522c5e4bf2d27a8b9c1cb721 100644 (file)
@@ -86,6 +86,14 @@ ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-literal-suffix")
 #
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-psabi")
 
+#
+# Disable warnings regarding improper direct memory access
+# if compiling without C++17 support
+#
+IF(NOT DEAL_II_WITH_CXX17)
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-class-memaccess")
+ENDIF()
+
 IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   #
   # Silence Clang warnings about unused compiler parameters (works around a

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.