https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110968
--- Comment #3 from CVS 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:f48a5423964f72e2e1ba0ad6a14d9d1464a78bed commit r14-3135-gf48a5423964f72e2e1ba0ad6a14d9d1464a78bed Author: Jonathan Wakely <jwak...@redhat.com> Date: Thu Aug 10 14:33:44 2023 +0100 libstdc++: Fix std::format for localized floats [PR110968] The __formatter_fp::_M_localize function just returns an empty string if the formatting locale is the C locale, as there is nothing to do. But the caller was assuming that the returned string contains the localized string. The caller should use the original string if _M_localize returns an empty string. libstdc++-v3/ChangeLog: PR libstdc++/110968 * include/std/format (__formatter_fp::format): Check return value of _M_localize. * testsuite/std/format/functions/format.cc: Check classic locale.