]> granicus.if.org Git - icu/commitdiff
ICU-12166 Fix mac clang has feature problem for C files.
authorAndy Heninger <andy.heninger@gmail.com>
Thu, 3 Mar 2016 00:09:47 +0000 (00:09 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Thu, 3 Mar 2016 00:09:47 +0000 (00:09 +0000)
X-SVN-Rev: 38468

icu4c/source/common/unicode/platform.h

index 5c3221d85e8a4bd8d7a438ebbe2b4f3ddff5e22d..6a88a6b82fbc355ca79daf899c9d74e6ddd88495 100644 (file)
  * 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
 
+
 /** @} */
 
 /*===========================================================================*/