This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/52681] New: [C++11] Using std::thread without -pthread crashes without warning
- From: "mkline at cs dot wisc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Mar 2012 01:49:21 +0000
- Subject: [Bug libstdc++/52681] New: [C++11] Using std::thread without -pthread crashes without warning
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52681
Bug #: 52681
Summary: [C++11] Using std::thread without -pthread crashes
without warning
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: libstdc++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: mkline@cs.wisc.edu
Without -pthread, the constructor of std::thread always throws
std::system_error. While this was apparently the resolution to bug 42198,
simply throwing an error with the code 'operation_not_permitted' is rather
mystifying to someone who isn't aware of the problem in the first place.
Would it be possible to offer a more descriptive error, preferably at compile
time?