# define U_HAVE_DEBUG_LOCATION_NEW 0
#endif
-/* Compatibility with non clang compilers: http://clang.llvm.org/docs/LanguageExtensions.html */
+/* Compatibility with compilers other than clang: http://clang.llvm.org/docs/LanguageExtensions.html */
#ifndef __has_attribute
# define __has_attribute(x) 0
#endif
* @internal
*/
#ifdef __cplusplus
-# if __has_cpp_attribute(clang::fallthrough) || \
- (__has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough"))
+# ifdef U_FALLTHROUGH
+ // Use the predefined value.
+# elif defined(__clang__) && \
+ (__has_cpp_attribute(clang::fallthrough) || \
+ (__has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")))
# define U_FALLTHROUGH [[clang::fallthrough]]
# else
# define U_FALLTHROUGH
c=(c<<6)|trail;
/* c>=0x110 would result in code point>0x10ffff, outside Unicode */
if(c>=0x110 || trail>0x3f) { break; }
+ U_FALLTHROUGH;
case 2:
trail=s[i++]-0x80;
c=(c<<6)|trail;
* before the last (c<<6), a surrogate is c=360..37f
*/
if(((c&0xffe0)==0x360 && strict!=-2) || trail>0x3f) { break; }
+ U_FALLTHROUGH;
case 1:
trail=s[i++]-0x80;
c=(c<<6)|trail;