[haiku-bugs] Re: [Haiku] #7916: C++11 thread support is broken. (was: mutex compiler support in gcc 4.5.3)

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Thu, 06 Mar 2014 13:14:37 -0000

#7916: C++11 thread support is broken.
----------------------------+----------------------------
   Reporter:  diger         |      Owner:  nobody
       Type:  enhancement   |     Status:  assigned
   Priority:  normal        |  Milestone:  R1
  Component:  Build System  |    Version:  R1/Development
 Resolution:                |   Keywords:
 Blocked By:                |   Blocking:
Has a Patch:  0             |   Platform:  All
----------------------------+----------------------------

Comment (by pulkomandy):

 With gcc4.8, the support for this was enabled. Compile with:
 {{{
 g++-x86 --std=c++11
 }}}

 The resulting binary raises an exception, however (
 gcc_x86-4.8.2_2014_01_28-2-x86_gcc2.hpkg / hrev46961).

 Here is another test case:
 {{{
 #include <thread>
 #include <stdio.h>

 int main(void)
 {
         std::thread::id t1 = std::thread::id();
         std::thread::id t2 = std::thread::id();

         printf("%s\n", t1 == t2 ? "PASS" : "FAIL");
 }
 }}}

 According to
 http://en.cppreference.com/w/cpp/thread/thread/id/operator_cmp, operator==
 should return true when comparing two uninitialized thread ids.

--
Ticket URL: <https://dev.haiku-os.org/ticket/7916#comment:2>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts:

  • » [haiku-bugs] Re: [Haiku] #7916: C++11 thread support is broken. (was: mutex compiler support in gcc 4.5.3) - pulkomandy