ICU-12166 Fix mac clang has feature problem for C files.

X-SVN-Rev: 38468
This commit is contained in:
Andy Heninger 2016-03-03 00:09:47 +00:00
parent d845084966
commit d743a8b947

View file

@ -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
/** @} */
/*===========================================================================*/