This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/52681] New: [C++11] Using std::thread without -pthread crashes without warning


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]