http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55917



Jonathan Wakely <redi at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

           Severity|normal                      |enhancement



--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-01-09 
13:44:35 UTC ---

As I said at http://gcc.gnu.org/ml/gcc-help/2013-01/msg00068.html this can't be

changed for std::thread, see

http://gcc.gnu.org/ml/libstdc++/2012-12/msg00062.html and the patch at

http://gcc.gnu.org/ml/libstdc++/2012-12/msg00068.html for discussion and code

that absolutely requires exceptions of type __forced_unwind to be able to

escape the thread start function, otherwise thread cancellation crashes the

program, which is not acceptable.



If the function is not noexcept then it must catch exceptions to ensure

std::terminate is called as required, and catching the exception causes the

stack to be unwound. So it's difficult do anything about std::thread.



Please open a separate bug (with Component=c++) for the

http://gcc.gnu.org/ml/gcc-help/2013-01/msg00058.html issue when noexcept

interacts with a destructor on the stack.  That applies to code not using

std::thread too.

Reply via email to