#if u8'\xff' != 0xff fails in the preprocessor unless -funsigned-char is specified · Issue #54886 · llvm/llvm-project (original) (raw)

From a discussion in https://reviews.llvm.org/D119221:

The following test case fails, unless -funsigned-char is specified; u8 character literals should always produce an unsigned char in C2x.

#if u8'\xff' != 0xff #error uh oh #endif

See also: https://godbolt.org/z/Tb7z85ToG