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

Re: No useful backtrace after uncaught exception in std::thread


On 15 November 2011 20:42, PaweÅ Sikora wrote:
> On Tuesday 15 of November 2011 21:32:58 Jonathan Wakely wrote:
>> Your program is still in the main thread, i.e. it failed to even
>> launch a thread - did you forget to use -pthread?
>
> i've used gcc commandline from original post (w/o -pthread), so it looks like another bug
> that allows std::thread compilation w/o (-pthread) -D_REENTRANT definition.

No, that's not a bug.

Not all platforms use _REENTRANT so checking for that wouldn't make
sense on those platforms.

It's the expected behaviour that if you don't link to libpthread then
the process is limited to a single thread, so if you try to launch
another thread you get an exception telling you there are not enough
resources to create the thread.


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