[libcxx-commits] [PATCH] D124555: [libcxx] basic_ios<wchar_t> cannot store fill character WCHAR_MAX
Hubert Tong via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 23 21:00:13 PDT 2022
hubert.reinterpretcast added inline comments.
================
Comment at: libcxx/include/__config:319
+#if defined(_AIX)
+# define _LIBCPP_BASIC_IOS_HAS_FILL_SET 1
----------------
It is my understanding that z/OS is also in the same situation.
================
Comment at: libcxx/include/__config:322
+#elif _WIN32 || \
+ (defined(__linux__) && (defined(_M_ARM) || defined(__arm__) || defined(_M_ARM64) || defined(__aarch64__)))
+# define _LIBCPP_BASIC_IOS_HAS_FILL_SET 0
----------------
It seems to me that `_M_ARM` and `_M_ARM64` is associated with Windows and not Linux.
================
Comment at: libcxx/include/ios:709
+ static const bool value =
+ (WEOF >= (wint_t)WCHAR_MIN || WEOF <= (wint_t)WCHAR_MAX);
+ };
----------------
If `wchar_t` is 16-bit unsigned, `wint_t` is 32-bit signed and `WEOF` is `-1`, then `WEOF` is less than `(wint_t)WCHAR_MAX` and `value` becomes `true` even though the new member is unneeded.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124555/new/
https://reviews.llvm.org/D124555
More information about the libcxx-commits
mailing list