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

--- Comment #20 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-11 
17:48:25 UTC ---
(In reply to comment #19)
> I've just tried it with the vendor cxx (first disabling noexcept for C++
> < 2011), and it also fails with EINVAL.

Well that's something vaguely positive at least ... the root cause probably
isn't a G++ front-end issue or libstdc++ issue.

> > I'm not sure if/when I'll be able to work on that.
> 
> Given that this is mostly autoconf work, I could give it a try myself if
> I can figure out where best to override the __GTHREAD_MUTEX_INIT
> definition from gthr-default.h/gthr-posix.h.  The problem seems to be
> that autoconf results go into <bits/c++config.h>, which is included way
> before <bits/gthr.h>.

Yes, that's why I thought of making it depend on some new
_GLIBCXX_BROKEN_GTHREAD_MUTEX_INIT macro set in <bits/c++config.h> by autoconf,
rather trying to alter gthr-posix.h

then e.g.

   class __mutex_base
   {
   protected:
     typedef __gthread_mutex_t           __native_type;

-#ifdef __GTHREAD_MUTEX_INIT
-#if defined __GTHREAD_MUTEX_INIT && !defined
_GLIBCXX_BROKEN_GTHREAD_MUTEX_INIT
     __native_type  _M_mutex = __GTHREAD_MUTEX_INIT;

     constexpr __mutex_base() noexcept = default;
#else
     __native_type  _M_mutex;

Reply via email to