From 940f179ab78514da2e06144ae52ea66c6af8e93e Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 20 Jul 2018 01:58:09 +0200 Subject: [PATCH] Don't actually construct deprecated objects in deprecation tests --- cmake/checks/check_02_compiler_features.cmake | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 { -- 2.39.5