Skip to content

Commit 6ea3344

Browse files
authored
[libc++] Fix regex_traits::isctype on big endian platforms (llvm#73200)
'isctype' fails in arm64-big-endian because the __regex_word involved in mask operation is not changed based on the platform endianness, while the character mask does change.
1 parent 5384fb3 commit 6ea3344

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/__locale

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public:
389389
static const mask punct = _ISpunct;
390390
static const mask xdigit = _ISxdigit;
391391
static const mask blank = _ISblank;
392-
#if defined(__mips__)
392+
#if defined(__mips__) || (BYTE_ORDER == BIG_ENDIAN)
393393
static const mask __regex_word = static_cast<mask>(_ISbit(15));
394394
#else
395395
static const mask __regex_word = 0x80;

0 commit comments

Comments
 (0)