From 1219b65f2167fabe58ce77f4bd7447da5fa02611 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 5 Dec 2019 10:04:29 -0800 Subject: [PATCH] Relax fallthrough attribute detection --- include/fmt/format.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 600b0eba..770cc145 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -69,7 +69,8 @@ # define FMT_HAS_BUILTIN(x) 0 #endif -#if FMT_HAS_CPP_ATTRIBUTE(fallthrough) >= 201603 && __cplusplus >= 201703 +#if FMT_HAS_CPP_ATTRIBUTE(fallthrough) && \ + (__cplusplus >= 201703 || FMT_GCC_VERSION != 0) # define FMT_FALLTHROUGH [[fallthrough]] #else # define FMT_FALLTHROUGH