https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82081
--- Comment #5 from Paweł Dziepak <pdziepak at quarnos dot org> --- Is it really undefined? n4700 states in 18.4/5: Whenever an exception is thrown and the search for a handler (18.3) encounters the outermost block of a function with a non-throwing exception specification, the function std::terminate() is called (18.5.1).