Skip to content

Commit

Permalink
Merge pull request #2274 from jwillemsen/jwi-ACE_FALLTHROUGH
Browse files Browse the repository at this point in the history
Cleanup ACE_FALLTHROUGH
  • Loading branch information
jwillemsen authored Aug 5, 2024
2 parents 21085b6 + 452d141 commit 2f43395
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
8 changes: 0 additions & 8 deletions ACE/ace/config-g++-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,12 @@
#endif
#if __cplusplus >= 201703L
# define ACE_HAS_CPP17
# define ACE_FALLTHROUGH [[fallthrough]]
#endif
#if __cplusplus >= 201402L
# define ACE_HAS_CPP14
#endif
#if __cplusplus >= 201103L
# define ACE_HAS_CPP11
# if !defined (ACE_FALLTHROUGH)
# if __GNUC__ >= 7
# define ACE_FALLTHROUGH [[gnu::fallthrough]]
# else
# define ACE_FALLTHROUGH
# endif
# endif
#endif

#if (defined (i386) || defined (__i386__)) && !defined (ACE_SIZEOF_LONG_DOUBLE)
Expand Down
9 changes: 1 addition & 8 deletions ACE/ace/config-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,8 @@
# define ACE_NOTREACHED(a) a
#endif /* ghs || ..... */


// Compiler-specific configs can define ACE_FALLTHROUGH but if not,
// and it's a C++17 or higher 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 */
# define ACE_FALLTHROUGH [[fallthrough]]
#endif /* ACE_FALLTHROUGH */

// ============================================================================
Expand Down

0 comments on commit 2f43395

Please sign in to comment.