https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78822
--- Comment #4 from janus at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #3) > I don't know what exactly you want to clean up with std::string Well, my main motivation was to get rid of some statically-sized buffers (used for error messages, typically 200 bytes large), which are either * never used (because no errors occurred), thus wasting memory, or * they might as well be too small for the error message (I think currently they are sufficient for typical cases, but one can construct cases where they are not). std::string seemed like a convenient tool here, but if you say it's a bad idea, there are other ways to go, I guess. (Btw, how would I actually make std::string use a xmalloc-based allocator?)