[libcxx-commits] [libcxx] [FIX] Fix the function isctype failed in arm64-big-endian (PR #73200)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 23 17:50:09 PST 2023


================
@@ -384,7 +384,7 @@ public:
     static const mask punct  = _ISpunct;
     static const mask xdigit = _ISxdigit;
     static const mask blank  = _ISblank;
-#if defined(__mips__)
+#if defined(__mips__) || (BYTE_ORDER == BIG_ENDIAN)
----------------
W-50243 wrote:

When I run libcxx test, I test the following cases on arm64-be and arm64-le:
>std::regex_traits<char> t;
std::string s("w");    
assert(!t.isctype('-', t.lookup_classname(s.begin(), s.end())));
assert(!t.isctype('@', t.lookup_classname(s.begin(), s.end()))); 

These cases come from `libcxx/test/std/re/re.traits/isctype.pass.cpp`. They all fail on arm64be but succeed in arm64le. 

https://github.com/llvm/llvm-project/pull/73200


More information about the libcxx-commits mailing list