Skip to content

Commit f84753d

Browse files
authored
Merge pull request diffblue#2042 from hannes-steffenhagen-diffblue/add_deprecate_macro
Disable deprecation warnings by default
2 parents 7a38669 + 75a4aec commit f84753d

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
2222
# Ensure NDEBUG is not set for release builds
2323
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
2424
# Enable lots of warnings
25-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wpedantic -Werror -Wno-error=deprecated-declarations")
25+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wpedantic -Werror -Wno-deprecated-declarations")
2626
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
2727
# This would be the place to enable warnings for Windows builds, although
2828
# config.inc doesn't seem to do that currently

src/config.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BUILD_ENV = AUTO
55
ifeq ($(BUILD_ENV),MSVC)
66
#CXXFLAGS += /Wall /WX
77
else
8-
CXXFLAGS += -Wall -pedantic -Werror -Wno-error=deprecated-declarations
8+
CXXFLAGS += -Wall -pedantic -Werror -Wno-deprecated-declarations
99
endif
1010

1111
# Select optimisation or debug info

src/util/arith_tools.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ class typet;
2323
// this one will go away
2424
// returns 'true' on error
2525
/// \deprecated: use the constant_exprt version instead
26-
//DEPRECATED("Use the constant_exprt version instead")
26+
DEPRECATED("Use the constant_exprt version instead")
2727
bool to_integer(const exprt &expr, mp_integer &int_value);
2828

2929
// returns 'true' on error
3030
/// \deprecated: use numeric_cast<mp_integer> instead
31-
//DEPRECATED("Use numeric_cast<mp_integer> instead")
31+
DEPRECATED("Use numeric_cast<mp_integer> instead")
3232
bool to_integer(const constant_exprt &expr, mp_integer &int_value);
3333

3434
// returns 'true' on error

src/util/mp_arith.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ const std::string integer2binary(const mp_integer &, std::size_t width);
5353
const mp_integer binary2integer(const std::string &, bool is_signed);
5454

5555
/// \deprecated use numeric_cast<unsigned long long> instead
56-
//DEPRECATED("Use numeric_cast<unsigned long long> instead")
56+
DEPRECATED("Use numeric_cast<unsigned long long> instead")
5757
mp_integer::ullong_t integer2ulong(const mp_integer &);
5858

5959
/// \deprecated use numeric_cast<std::size_t> instead
60-
//DEPRECATED("Use numeric_cast<std::size_t> instead")
60+
DEPRECATED("Use numeric_cast<std::size_t> instead")
6161
std::size_t integer2size_t(const mp_integer &);
6262

6363
/// \deprecated use numeric_cast<unsigned> instead
64-
//DEPRECATED("Use numeric_cast<unsigned> instead")
64+
DEPRECATED("Use numeric_cast<unsigned> instead")
6565
unsigned integer2unsigned(const mp_integer &);
6666

6767
const mp_integer mp_zero=string2integer("0");

0 commit comments

Comments
 (0)