From: Daniel Arndt Date: Thu, 19 Jul 2018 23:58:09 +0000 (+0200) Subject: Don't actually construct deprecated objects in deprecation tests X-Git-Tag: v9.1.0-rc1~906^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=940f179ab78514da2e06144ae52ea66c6af8e93e;p=dealii.git Don't actually construct deprecated objects in deprecation tests --- diff --git a/cmake/checks/check_02_compiler_features.cmake b/cmake/checks/check_02_compiler_features.cmake index 56d7e51690..d826c38119 100644 --- a/cmake/checks/check_02_compiler_features.cmake +++ b/cmake/checks/check_02_compiler_features.cmake @@ -290,13 +290,12 @@ ENDIF() # - Wolfgang Bangerth, 2012 # -# some compilers compile the attributes but they do not work: +# some compilers compile the attributes but they do not work +# so we treat errors as warnings: # "warning: use of the 'deprecated' attribute is a C++14 extension" (clang in c++11 mode) # "warning #1292: unknown attribute "deprecated"" (icc) PUSH_CMAKE_REQUIRED("${DEAL_II_CXX_FLAGS}") PUSH_CMAKE_REQUIRED("-Werror") -PUSH_CMAKE_REQUIRED("-Wno-deprecated-declarations") -PUSH_CMAKE_REQUIRED("-Wno-deprecated") PUSH_CMAKE_REQUIRED("-Wno-unused-command-line-argument") # first see if the compiler accepts the attribute @@ -304,7 +303,6 @@ CHECK_CXX_SOURCE_COMPILES( " [[deprecated]] int old_fn (); int old_fn () { return 0; } - int (*fn_ptr)() = old_fn; struct [[deprecated]] bob { @@ -321,7 +319,6 @@ CHECK_CXX_SOURCE_COMPILES( " __attribute__((deprecated)) int old_fn (); int old_fn () { return 0; } - int (*fn_ptr)() = old_fn; struct __attribute__((deprecated)) bob {