summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2020-12-27 20:53:09 +0000
committerStefan Eßer <se@FreeBSD.org>2020-12-27 20:53:09 +0000
commit7fe0a3f2085758fdef0a705dbc81d72f1f1953c6 (patch)
tree8d2f9afb543276267aa1f00b15d1b7c6bb8753f0 /include
parent253e722024bb7ee47360bbb12c6893e7c8d7b780 (diff)
Diffstat (limited to 'include')
-rw-r--r--include/status.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/status.h b/include/status.h
index 762ff3e25c36..2807a28af4ef 100644
--- a/include/status.h
+++ b/include/status.h
@@ -166,7 +166,11 @@ typedef enum BcErr {
#endif // __STDC_VERSION__
#if defined(__clang__) || defined(__GNUC__)
+#if defined(__has_attribute) && __has_attribute(fallthrough)
#define BC_FALLTHROUGH __attribute__((fallthrough));
+#else // defined(__has_attribute) && __has_attribute(fallthrough)
+#define BC_FALLTHROUGH
+#endif // defined(__has_attribute) && __has_attribute(fallthrough)
#else // defined(__clang__) || defined(__GNUC__)
#define BC_FALLTHROUGH
#endif //defined(__clang__) || defined(__GNUC__)