diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-09-11 17:20:31 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-09-11 22:39:16 +0200 |
commit | 2d6df9bc36b81ab63bb5b7fe2648f156d3ed74ae (patch) | |
tree | 17f5880064e0efa878ac015c795d96306b63fa36 /include | |
parent | 50921d122399d669a2c401b8d26d90a0c7e14d14 (diff) |
Use [[fallthrough]] also with MSVC
Change-Id: I840de9460c164b86dcbd96b4c0f382e1a1b609a2
Reviewed-on: https://gerrit.libreoffice.org/60330
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sal/types.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/sal/types.h b/include/sal/types.h index 875f121db1ae..474a223a2ff2 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -422,10 +422,12 @@ namespace css = ::com::sun::star; #endif #if defined LIBO_INTERNAL_ONLY -#if defined __clang__ -#define SAL_FALLTHROUGH [[clang::fallthrough]] -#elif defined __GNUC__ && __GNUC__ >= 7 +#if HAVE_CPP_ATTRIBUTE_FALLTHROUGH #define SAL_FALLTHROUGH [[fallthrough]] +#elif defined __clang__ + /* before Clang 3.9, according to + <https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B17_features> */ +#define SAL_FALLTHROUGH [[clang::fallthrough]] #else #define SAL_FALLTHROUGH #endif |