https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100146
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The uselocale thing could be handled by defining the macros only if _GLIBCXX_HAVE_USELOCALE. Does any implementation actually handle it without memory allocations? I mean, even sprintf can fail with ENOMEM if it needs to allocate memory and looking at glibc __printf_fp_l, there are paths in which it calls malloc as opposed to e.g. alloca.