https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110172
--- Comment #4 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #3) > I mentioned that on IRC. I'm not sure glibc can even handle exceptions from > those functions. Is that supported at all? Does printf clean up its own > allocations and locks in that case? IMHO it should be UB for printf_function > to exit via an exception. They compile vfprintf.c with -fexceptions, so it looks like they are at least attempting to make it work. And if they don't want to support it at all, they should've use __nothrow attribute or noexcept(true) for vfprintf then we wouldn't see the warning.