https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119429
--- Comment #9 from Desmond Rhodes <desmond.rhodes at outlook dot com> --- Just as a side note, I've never encountered `UndefinedBehaviorSanitizer` triggered by the standard library before. It's only recently with the C++20 and C++23 standards new features that are turning on all the alarm bells. For the time being, I can live with it by avoiding the new `std::format` and everything that relies on it (eg. `std::print`). However, I don't think this is productive for the future adoption of new standards. I don't know where else in the standard library it might happen. Currently, my build is stable with C++17. I do not wish my project to become one of those who are stuck in the past and never able to move to the new standard. Usually, when migrating to a new C++ standard, the bug lies within my codebase, which I can deal with. However, this time around, the bug lies within the standard library, and it is not my domain to change it. I could modify the implementation and maintain an internal version of the `std::format` myself. But again, going forwards, I believe this is counterproductive for the future adoption of new standards.