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++/51296] Several 30_threads tests FAIL on Tru64 UNIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51296

--- Comment #27 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-16 19:36:49 UTC ---
C++11 requires that std::mutex::mutex() is constexpr, so that a global
std::mutex will be statically initialized. If that constructor is constexpr it
can't call pthread_mutex_init().

But C++11 also requires non-global, non-static mutexes to be possible, so we
can't use the PTHREAD_MUTEX_INITIALIZER either.

The option we've taken is to ignore the text I quoted in comment 25 and rely on
the macro working for non-statically allocated mutexes, which works on most
platforms.


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