[libcxx-commits] [libcxx] [libc++] Format into stack buffer before allocating for floats (PR #212502)
Adib Pathan via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Aug 1 05:01:17 PDT 2026
adxb-pxthxn wrote:
Thanks for the review — you're right that mapping unspecified precision to `6` changes semantics and is not the correct fix.
I've updated the patch to keep unspecified precision equivalent to calling `to_chars` without a precision argument. `__float_buffer` now starts on the stack in that case, and we allocate only if `to_chars` returns `errc::value_too_large` (as suggested in #211909). The allocation regression test is unchanged.
https://github.com/llvm/llvm-project/pull/212502
More information about the libcxx-commits
mailing list