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

Nancy Wang via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 11 11:17:03 PST 2022


NancyWang2222 added inline comments.


================
Comment at: libcxx/include/__locale:571
 
+    static bool __is_valid_in_encoding(char_type __c)
+    {
----------------
ldionne wrote:
> Here and below.
i will add.


================
Comment at: libcxx/include/__locale:685
+#if defined(__MVS__)
+        return __c ? true : true;
+#else
----------------
ldionne wrote:
> NancyWang2222 wrote:
> > NancyWang2222 wrote:
> > > Mordante wrote:
> > > > Is this intended to always return true, if you please just return `true`. You can use a `(void) __c;` to silence compiler diagnostics.
> > > clang will emit error if argument __c is not used in function. that is why I checked __c. 
> > I will add void(__c); 
> Why is this intended to always return true?
isascii function is not right test for z/OS,  char type is between [0-255] which is valid character  indexing in __tab function on z/OS for both ASCII and EBCDIC. 


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

https://reviews.llvm.org/D118851



More information about the libcxx-commits mailing list