From 67735b594606fdf70608a3f6148c75374a1103fb Mon Sep 17 00:00:00 2001 From: Hannes Steffenhagen Date: Wed, 11 Apr 2018 17:31:39 +0100 Subject: [PATCH 1/2] Disable deprecation warnings by default --- CMakeLists.txt | 2 +- src/config.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1267291b03..030fd699e45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR # Ensure NDEBUG is not set for release builds set(CMAKE_CXX_FLAGS_RELEASE "-O2") # Enable lots of warnings - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wpedantic -Werror -Wno-error=deprecated-declarations") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wpedantic -Werror -Wno-deprecated-declarations") elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # This would be the place to enable warnings for Windows builds, although # config.inc doesn't seem to do that currently diff --git a/src/config.inc b/src/config.inc index 5290ee5a9cb..00d2bda6845 100644 --- a/src/config.inc +++ b/src/config.inc @@ -5,7 +5,7 @@ BUILD_ENV = AUTO ifeq ($(BUILD_ENV),MSVC) #CXXFLAGS += /Wall /WX else - CXXFLAGS += -Wall -pedantic -Werror -Wno-error=deprecated-declarations + CXXFLAGS += -Wall -pedantic -Werror -Wno-deprecated-declarations endif # Select optimisation or debug info From 75a4aec2f697c86b496566a055117a57a90552e8 Mon Sep 17 00:00:00 2001 From: Hannes Steffenhagen Date: Thu, 12 Apr 2018 10:59:06 +0100 Subject: [PATCH 2/2] Revert "the deprecation will need to wait until codebase is clean" This reverts commit bba17d9daff08bfee495964b2c98e7d9f078b843. The concerns of that commit should be addressed by disabling the warnings by default --- src/util/arith_tools.h | 4 ++-- src/util/mp_arith.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util/arith_tools.h b/src/util/arith_tools.h index d5a6b745925..54f8ed60fb8 100644 --- a/src/util/arith_tools.h +++ b/src/util/arith_tools.h @@ -23,12 +23,12 @@ class typet; // this one will go away // returns 'true' on error /// \deprecated: use the constant_exprt version instead -//DEPRECATED("Use the constant_exprt version instead") +DEPRECATED("Use the constant_exprt version instead") bool to_integer(const exprt &expr, mp_integer &int_value); // returns 'true' on error /// \deprecated: use numeric_cast instead -//DEPRECATED("Use numeric_cast instead") +DEPRECATED("Use numeric_cast instead") bool to_integer(const constant_exprt &expr, mp_integer &int_value); // returns 'true' on error diff --git a/src/util/mp_arith.h b/src/util/mp_arith.h index aeff8ec290b..4093e480628 100644 --- a/src/util/mp_arith.h +++ b/src/util/mp_arith.h @@ -53,15 +53,15 @@ const std::string integer2binary(const mp_integer &, std::size_t width); const mp_integer binary2integer(const std::string &, bool is_signed); /// \deprecated use numeric_cast instead -//DEPRECATED("Use numeric_cast instead") +DEPRECATED("Use numeric_cast instead") mp_integer::ullong_t integer2ulong(const mp_integer &); /// \deprecated use numeric_cast instead -//DEPRECATED("Use numeric_cast instead") +DEPRECATED("Use numeric_cast instead") std::size_t integer2size_t(const mp_integer &); /// \deprecated use numeric_cast instead -//DEPRECATED("Use numeric_cast instead") +DEPRECATED("Use numeric_cast instead") unsigned integer2unsigned(const mp_integer &); const mp_integer mp_zero=string2integer("0");