https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114325
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:f89cfdb2f2e9b4fe517b1e00511c4d70a7014cbc commit r14-9479-gf89cfdb2f2e9b4fe517b1e00511c4d70a7014cbc Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed Mar 13 21:19:54 2024 +0000 libstdc++: Fix std::format("{}", negative_integer) [PR114325] The fast path for "{}" format strings has a bug for negative integers where the length passed to std::to_chars is too long. libstdc++-v3/ChangeLog: PR libstdc++/114325 * include/std/format (_Scanner::_M_scan): Pass correct length to __to_chars_10_impl. * testsuite/std/format/functions/format.cc: Check negative integers with empty format-spec.