summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2021-09-09 19:58:42 -0700
committerGitHub <noreply@github.com>2021-09-10 02:58:42 +0000
commit6255b7045c9e21066eb48cead218e44f7add5826 (patch)
tree9be8240f0ce11022100072bb6fb46c61ff448420 /src/base
parent5369982ff5c493f72e6f8309d8be632866314805 (diff)
Use C++17 attributes (#7154)
Currently, we are using non-standard attributes. With C++17, all the attributes that we use regularly are now standardized. This commit replaces the compiler-specific attributes with standard ones.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/check.h24
-rw-r--r--src/base/output.h8
2 files changed, 4 insertions, 28 deletions
diff --git a/src/base/check.h b/src/base/check.h
index ac12e2acb..916d6a6a1 100644
--- a/src/base/check.h
+++ b/src/base/check.h
@@ -39,30 +39,6 @@
#include "base/exception.h"
#include "cvc5_export.h"
-// Define CVC5_PREDICT_FALSE(x) that helps the compiler predict that x will be
-// false (if there is compiler support).
-#ifdef __has_builtin
-#if __has_builtin(__builtin_expect)
-#define CVC5_PREDICT_FALSE(x) (__builtin_expect(x, false))
-#define CVC5_PREDICT_TRUE(x) (__builtin_expect(x, true))
-#else
-#define CVC5_PREDICT_FALSE(x) x
-#define CVC5_PREDICT_TRUE(x) x
-#endif
-#else
-#define CVC5_PREDICT_FALSE(x) x
-#define CVC5_PREDICT_TRUE(x) x
-#endif
-
-#ifdef __has_cpp_attribute
-#if __has_cpp_attribute(fallthrough)
-#define CVC5_FALLTHROUGH [[fallthrough]]
-#endif // __has_cpp_attribute(fallthrough)
-#endif // __has_cpp_attribute
-#ifndef CVC5_FALLTHROUGH
-#define CVC5_FALLTHROUGH
-#endif
-
namespace cvc5 {
// Implementation notes:
diff --git a/src/base/output.h b/src/base/output.h
index c0dbb3d7c..cc6bfb316 100644
--- a/src/base/output.h
+++ b/src/base/output.h
@@ -469,10 +469,10 @@ extern DumpOutC DumpOutChannel CVC5_EXPORT;
// just parenthesize it e.g. !(Debug("foo").isOn())
class __cvc5_true
{
- void operator!() CVC5_UNUSED;
- void operator~() CVC5_UNUSED;
- void operator-() CVC5_UNUSED;
- void operator+() CVC5_UNUSED;
+ CVC5_UNUSED void operator!();
+ CVC5_UNUSED void operator~();
+ CVC5_UNUSED void operator-();
+ CVC5_UNUSED void operator+();
public:
inline operator bool() { return true; }
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback