summaryrefslogtreecommitdiff
path: root/ACE/ace/config-macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/config-macros.h')
-rw-r--r--ACE/ace/config-macros.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/ACE/ace/config-macros.h b/ACE/ace/config-macros.h
index 22b544286ca..5f948b679ed 100644
--- a/ACE/ace/config-macros.h
+++ b/ACE/ace/config-macros.h
@@ -246,6 +246,17 @@
# define ACE_NOTREACHED(a) a
#endif /* ghs || ..... */
+
+// Compiler-specific configs can define ACE_FALLTHROUGH but if not,
+// and it's a C++17 or hgher compiler, use the defined mechanism.
+#if !defined ACE_FALLTHROUGH
+# if defined ACE_HAS_CPP17
+# define ACE_FALLTHROUGH [[fallthrough]]
+# else
+# define ACE_FALLTHROUGH
+# endif /* ACE_HAS_CPP17 */
+#endif /* ACE_FALLTHROUGH */
+
// ============================================================================
// ACE_ALLOC_HOOK* macros
//