https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92289
--- Comment #1 from Tony E Lewis <TonyELewis at hotmail dot com> --- Sorry: I should have said... Even the original warning isn't ideal because the compiler has enough information to know that all paths through f() either return a value or throw. So I don't think it should warn at all really. But if it is going to warn, I don't think its diagnostics should degrade when UBSan is enabled.