From 97348a2ce072e642416ac076cfe033b7153db1b7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 18 Sep 2020 09:53:26 -0400 Subject: [PATCH] Rearrange ifdef logic for excluding pre-C++17 fallthrough attributes This puts Intel and PGI compilers into a separate group and thus makes the intent and logic more obvious. --- include/fmt/format.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 90c71640..295b8071 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -70,9 +70,11 @@ #endif #if __cplusplus == 201103L || __cplusplus == 201402L -# if defined(__clang__) && !defined(__INTEL_COMPILER) +# if defined(__INTEL_COMPILER) || defined(__PGI) +# define FMT_FALLTHROUGH +# elif defined(__clang__) # define FMT_FALLTHROUGH [[clang::fallthrough]] -# elif FMT_GCC_VERSION >= 700 && !defined(__PGI) && !defined(__INTEL_COMPILER) && \ +# elif FMT_GCC_VERSION >= 700 && \ (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 520) # define FMT_FALLTHROUGH [[gnu::fallthrough]] # else