diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2022-08-29 15:24:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 15:24:44 +0200 |
commit | 348277c5a753b65b7a0cc206720fd7ea47f81659 (patch) | |
tree | 20948da31c28d8ccbee5190fd7c441283e8ea457 | |
parent | c86d810dec3f11f7450312f7618fb1b25053cf16 (diff) | |
parent | dd6e99566974c958738973d72bd7f3695447af44 (diff) | |
download | ATCD-348277c5a753b65b7a0cc206720fd7ea47f81659.tar.gz |
Merge pull request #1910 from Erich71/old_gcc_fix
Fix ACE_FALLTHROUGH definition for old GCC compilers.
-rw-r--r-- | ACE/ace/config-g++-common.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/ACE/ace/config-g++-common.h b/ACE/ace/config-g++-common.h index 2bcdde43e74..9923daf5e2c 100644 --- a/ACE/ace/config-g++-common.h +++ b/ACE/ace/config-g++-common.h @@ -16,19 +16,23 @@ #define ACE_TEMPLATES_REQUIRE_SOURCE -#if __cplusplus >= 201103L -# define ACE_HAS_CPP11 -# define ACE_FALLTHROUGH [[gnu::fallthrough]] -#endif -#if __cplusplus >= 201402L -# define ACE_HAS_CPP14 -# define ACE_FALLTHROUGH [[gnu::fallthrough]] +#if __cplusplus >= 202002L +# define ACE_HAS_CPP20 #endif #if __cplusplus >= 201703L # define ACE_HAS_CPP17 +# define ACE_FALLTHROUGH [[fallthrough]] #endif -#if __cplusplus >= 202002L -# define ACE_HAS_CPP20 +#if __cplusplus >= 201402L +# define ACE_HAS_CPP14 +#endif +#if __cplusplus >= 201103L +# define ACE_HAS_CPP11 +# if !defined (ACE_FALLTHROUGH) && (__GNUC__ >= 7) +# define ACE_FALLTHROUGH [[gnu::fallthrough]] +# else +# define ACE_FALLTHROUGH +# endif #endif #if (defined (i386) || defined (__i386__)) && !defined (ACE_SIZEOF_LONG_DOUBLE) |