[libcxx-commits] [PATCH] D124555: [libcxx] basic_ios<wchar_t> cannot store fill character WCHAR_MAX

Chris Bowler via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 14 17:50:06 PDT 2022

cebowleratibm updated this revision to Diff 436986.
cebowleratibm retitled this revision from "[libcxx][AIX][z/OS] basic_ios<wchar_t> cannot store fill character WCHAR_MAX" to "[libcxx] basic_ios<wchar_t> cannot store fill character WCHAR_MAX".
cebowleratibm added a comment.

The new approach injects the new `__fill_set_` only for wchar_t and only if WEOF is in the range `[WCHAR_MIN, WCHAR_MAX]`.  I didn't use numeric_limits because the solution needs to work in C++03.

On AIX I need to force the injection of the member to retain compatibility, even when it's not actually needed.

I disabled the ABI break on _WIN32 targets, and I suspect I need to further customize the compatibility opt out.  The default behaviour for new targets is to adopt the fix for wchar_t if wchar_t is impacted.  I can't fix this for other char types without constexpr numeric limits and char_traits and we need to keep the layout compatible between C++03 and C++11.

  rG LLVM Github Monorepo




-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124555.436986.patch
Type: text/x-patch
Size: 4231 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220615/ab5ad36a/attachment.bin>

More information about the libcxx-commits mailing list