]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Don't actually construct deprecated objects in deprecation tests
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 19 Jul 2018 23:58:09 +0000 (01:58 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 21 Jul 2018 12:29:59 +0000 (14:29 +0200)
cmake/checks/check_02_compiler_features.cmake

index 56d7e51690156f940df2546de2fa978221221a19..d826c38119a4a4bbdd225a8a694d8ba940a1d60f 100644 (file)
@@ -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
           {

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.