[Bug c++/67036] GCC does not warn of throwing destructors in C++11, even when they lack noexcept(false) and std::uncaught_exception

noloader at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Jul 27 22:33:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67036

--- Comment #1 from Jeffrey Walton <noloader at gmail dot com> ---
> I can state from experience the Visual Studio warning alerted us to look at
> a particular dtor, and it was not checking for !std::uncaught_exception()
> before throwing. (It was one of two classes among hundreds that threw, so it
> was easy to miss throughout the day).
> 
My bad... this was not clear.

There were hundreds of classes, and only two threw in the dtor. The other that
threw guarded based on !std::uncaught_exception().



More information about the Gcc-bugs mailing list