From: Daniel Arndt Date: Tue, 3 Jul 2018 21:36:35 +0000 (+0200) Subject: Disable -Wclass-memaccess for non-CXX17 builds and in bundled boost X-Git-Tag: v9.1.0-rc1~961^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6878%2Fhead;p=dealii.git Disable -Wclass-memaccess for non-CXX17 builds and in bundled boost --- diff --git a/bundled/boost-1.62.0/include/boost/container/detail/copy_move_algo.hpp b/bundled/boost-1.62.0/include/boost/container/detail/copy_move_algo.hpp index ead93c6035..93573211a9 100644 --- a/bundled/boost-1.62.0/include/boost/container/detail/copy_move_algo.hpp +++ b/bundled/boost-1.62.0/include/boost/container/detail/copy_move_algo.hpp @@ -34,7 +34,12 @@ // other #include // std -#include //for emmove/memcpy +#include //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 diff --git a/cmake/setup_compiler_flags_gnu.cmake b/cmake/setup_compiler_flags_gnu.cmake index ba005571e3..ae5496f683 100644 --- a/cmake/setup_compiler_flags_gnu.cmake +++ b/cmake/setup_compiler_flags_gnu.cmake @@ -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