[libcxx-commits] [PATCH] D136705: libcxx: Disable __regex_word assert on newlib

Manoj Gupta via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 25 11:14:54 PDT 2022


manojgupta created this revision.
manojgupta added reviewers: ldionne, abidh.
Herald added a subscriber: ki.stfu.
Herald added a project: All.
manojgupta requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

newlib defines blank as O200 (0x80)
(newlib/libc/include/ctype.h),
which is the same as __regex_word, so the static_assert fails.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136705

Files:
  libcxx/include/__locale


Index: libcxx/include/__locale
===================================================================
--- libcxx/include/__locale
+++ libcxx/include/__locale
@@ -549,8 +549,10 @@
 
     _LIBCPP_INLINE_VISIBILITY ctype_base() {}
 
+#if !defined(_NEWLIB_VERSION)
     static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
                   "__regex_word can't overlap other bits");
+#endif
 };
 
 template <class _CharT> class _LIBCPP_TEMPLATE_VIS ctype;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136705.470572.patch
Type: text/x-patch
Size: 527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221025/ddccbafa/attachment.bin>


More information about the libcxx-commits mailing list