CBMC
deprecate.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Diffblue Ltd.
6 
7 \*******************************************************************/
8 
9 #ifndef CPROVER_UTIL_DEPRECATE_H
10 #define CPROVER_UTIL_DEPRECATE_H
11 
12 #if __cplusplus >= 201402L
13 // C++14
14 #define DEPRECATED(msg) [[deprecated(msg)]]
15 #elif defined(__GNUC__)
16 // GCC and GCC compatible compilers
17 #define DEPRECATED(msg) __attribute__((deprecated(msg)))
18 #elif defined(_MSC_VER)
19 // Visual Studio
20 #define DEPRECATED(msg) __declspec(deprecated(msg))
21 #else
22 // Compiler we don't know how to handle or that doesn't have deprecation support
23 #define DEPRECATED(msg)
24 #endif
25 
26 #define SINCE(year, month, day, msg) \
27  "deprecated since " #year "-" #month "-" #day "; " msg
28 
29 #endif // CPROVER_UTIL_DEPRECATE_H