From 61422eccafd2c414979cdf605a6903dcb4bd06b3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 18 Sep 2020 07:18:03 -0400 Subject: [PATCH] Disable fallthrough attributes for the Intel compilers On MacOS and Linux the Intel compilers may be identified as the host compilers (Clang or GNU) but do not support the corresponding compiler specific fallthrough attributes. --- include/fmt/format.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index ca26e772..90c71640 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -70,9 +70,9 @@ #endif #if __cplusplus == 201103L || __cplusplus == 201402L -# if defined(__clang__) +# if defined(__clang__) && !defined(__INTEL_COMPILER) # define FMT_FALLTHROUGH [[clang::fallthrough]] -# elif FMT_GCC_VERSION >= 700 && !defined(__PGI) && \ +# elif FMT_GCC_VERSION >= 700 && !defined(__PGI) && !defined(__INTEL_COMPILER) && \ (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 520) # define FMT_FALLTHROUGH [[gnu::fallthrough]] # else