This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3] improve exception text when threads not enabled
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 13 Aug 2012 08:47:06 -0700
- Subject: Re: [v3] improve exception text when threads not enabled
- References: <CAH6eHdRf6Ob0ycuoeBS_Ufpp6006iNMh9VZtMizisk+M24tqhQ@mail.gmail.com>
On Sun, Aug 12, 2012 at 08:02:30PM +0100, Jonathan Wakely wrote:
> 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
The new message still seems deficient. The issue is that the executable
does not contain any thread support; "not permitted" usually suggests a
permission violation (like trying to write a read-only file). Perhaps "no
thread support found" should be used instead of "Operation not permitted".