forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DEPRECATED macro to mark deprecated functions and variables
- Loading branch information
1 parent
768e8a6
commit 116fffd
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/*******************************************************************\ | ||
Module: | ||
Author: Diffblue Ltd. | ||
\*******************************************************************/ | ||
|
||
#ifndef CPROVER_UTIL_DEPRECATE_H | ||
#define CPROVER_UTIL_DEPRECATE_H | ||
|
||
#if __cplusplus >= 201402L | ||
// C++14 | ||
#define DEPRECATED(msg) [[deprecated(msg)]] | ||
#elif defined(__GNUC__) | ||
// GCC and GCC compatible compilers | ||
#define DEPRECATED(msg) __attribute__((deprecated(msg))) | ||
#elif defined(_MSC_VER) | ||
// Visual Studio | ||
#define DEPRECATED(msg) __declspec(deprecated(msg)) | ||
#else | ||
// Compiler we don't know how to handle or that doesn't have deprecation support | ||
#define DEPRECATED(msg) | ||
#endif | ||
|
||
#endif // CPROVER_UTIL_DEPRECATE_H |