From d743a8b9470b2c8864f969a2708371263a1a4fbf Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Thu, 3 Mar 2016 00:09:47 +0000 Subject: [PATCH] ICU-12166 Fix mac clang has feature problem for C files. X-SVN-Rev: 38468 --- icu4c/source/common/unicode/platform.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/icu4c/source/common/unicode/platform.h b/icu4c/source/common/unicode/platform.h index 5c3221d85e8..6a88a6b82fb 100644 --- a/icu4c/source/common/unicode/platform.h +++ b/icu4c/source/common/unicode/platform.h @@ -533,13 +533,18 @@ * http://clang.llvm.org/docs/AttributeReference.html#fallthrough-clang-fallthrough * @internal */ -#if __has_cpp_attribute(clang::fallthrough) || \ - (__has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")) -# define U_FALLTHROUGH [[clang::fallthrough]] +#ifdef __cplusplus +# if __has_cpp_attribute(clang::fallthrough) || \ + (__has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")) +# define U_FALLTHROUGH [[clang::fallthrough]] +# else +# define U_FALLTHROUGH +# endif #else # define U_FALLTHROUGH #endif + /** @} */ /*===========================================================================*/ -- 2.40.0