summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2022-03-19 19:31:27 +0000
committerSteve Huston <shuston@riverace.com>2022-03-19 19:31:27 +0000
commit39364bd8841e0387d9ded3dbf4eb586b9e8f6d6f (patch)
tree905093a8a2fb58d1be5d6041c698fa38b112238c
parent7cf5c386fe0a5df066a7296e687a23b06e93d672 (diff)
downloadATCD-39364bd8841e0387d9ded3dbf4eb586b9e8f6d6f.tar.gz
Add CPP14 and 11 mechanisms to allow fallthrough
-rw-r--r--ACE/ace/config-g++-common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ACE/ace/config-g++-common.h b/ACE/ace/config-g++-common.h
index be8714daf15..67a2e4e6c1f 100644
--- a/ACE/ace/config-g++-common.h
+++ b/ACE/ace/config-g++-common.h
@@ -34,12 +34,15 @@
# define ACE_HAS_NEW_NOTHROW
#endif /* __GNUC__ >= 3.3 */
+// g++ has private attributes to do fallthrough until the standard one comes into play at c++17
#if (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
# if __cplusplus > 199711L
# define ACE_HAS_CPP11
+# define ACE_FALLTHROUGH [[gnu::fallthrough]]
# endif
# if __cplusplus >= 201402L
# define ACE_HAS_CPP14
+# define ACE_FALLTHROUGH [[gnu::fallthrough]]
# endif
# if __cplusplus >= 201703L
# define ACE_HAS_CPP17