https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98384
--- Comment #29 from Iain Sandoe <iains at gcc dot gnu.org> --- it seems that libc++ doesn't have support for long double to_chars yet, so I couldn't do a comparison with the platform libc++. However, I did build the code with clang (but using -stdlib=libstdc++, so the headers and implementation are the same as for GCC) - but OTOH that does rule out code-gen. (same result). .. also checked feget/setround and it seems that the default is correct. So.. most likely this is a libc problem, I guess (and not sure how to report it at the moment, since there's no reproducer for the system compiler).