This is the mail archive of the gcc-patches@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]

[v3] improve exception text when threads not enabled


This improves the fairly uninformative "Operation not supported"
message given when std::thread is used without linking to libpthread.

Now you get:

terminate called after throwing an instance of 'std::system_error'
  what():  Enable multithreading to use std::thread: Operation not permitted
Aborted

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

Tested x86_64-linux, with exceptions enabled and disabled. Committed to trunk.

Attachment: patch.txt
Description: Text document


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