[libcxx-commits] [PATCH] D118851: [SystemZ]:[z/OS]:[libcxx]: fix isascii function to work for z/OS

Sean via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 9 11:45:32 PST 2022


SeanP added inline comments.


================
Comment at: libcxx/include/__locale:573
+    {
+#if defined(__MVS__)
+        return (__c >=0 && __c < 256);
----------------
Mordante wrote:
> Should this be `#if defined(__MVS__) && !defined(__NATIVE_ASCII_F)` like you did in D118849?
Thanks for thinking about ebcdic.  The purpose of this function is to make sure the value in the range supported by the `__tab` indexing.  On z/OS, the `__tab` is 256 chars regardless of ascii or ebcdic so the 0-255 range check works for both ascii & ebcdic.

I like the proposed new name.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118851/new/

https://reviews.llvm.org/D118851



More information about the libcxx-commits mailing list