diff --git a/icu4c/source/common/unicode/utf.h b/icu4c/source/common/unicode/utf.h index 6f89c64e681..f5637e2ad65 100644 --- a/icu4c/source/common/unicode/utf.h +++ b/icu4c/source/common/unicode/utf.h @@ -207,8 +207,9 @@ typedef int32_t UTextOffset; * Is a given 32-bit code point a Unicode noncharacter? */ #define UTF_IS_UNICODE_NONCHAR(c) \ - (((((c) & 0xfffe) == 0xfffe) || ((c) >= 0xfdd0 && (c) <= 0xfdef)) && \ - ((c) <= 0x10ffff)) + ((c)>=0xfdd0 && \ + ((uint32_t)(c)<=0xfdef || ((c)&0xfffe)==0xfffe) && \ + (uint32_t)(c)<=0x10ffff) /** * Is a given 32-bit code point/Unicode scalar value