Commit 3722862e by Jonathan Wakely Committed by Jonathan Wakely

re PR libstdc++/52681 ([C++11] Using std::thread without -pthread crashes without warning)

	PR libstdc++/52681
	* src/c++11/thread.cc (thread::_M_start_thread): Improve error text
	when threads are not enabled.

From-SVN: r190330
parent 874a3756
2012-08-12 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/52681
* src/c++11/thread.cc (thread::_M_start_thread): Improve error text
when threads are not enabled.
2012-08-09 Jonathan Wakely <jwakely.gcc@gmail.com>
* acinclude.m4: Update references to final C++11 standard.
......
......@@ -115,7 +115,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
thread::_M_start_thread(__shared_base_type __b)
{
if (!__gthread_active_p())
#if __EXCEPTIONS
throw system_error(make_error_code(errc::operation_not_permitted),
"Enable multithreading to use std::thread");
#else
__throw_system_error(int(errc::operation_not_permitted));
#endif
__b->_M_this_ptr = __b;
int __e = __gthread_create(&_M_id._M_thread,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment