https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79114 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- This is also rejected: #include <exception> void f() { } int main() { std::throw_with_nested(f); }