This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/46289] [4.6 regression] ICE in build_constexpr_constructor_member_initializers, at cp/semantics.c:5513
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 3 Nov 2010 14:39:49 +0000
- Subject: [Bug c++/46289] [4.6 regression] ICE in build_constexpr_constructor_member_initializers, at cp/semantics.c:5513
- Auto-submitted: auto-generated
- References: <bug-46289-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46289
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |redi at gcc dot gnu.org
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-11-03 14:39:33 UTC ---
Ah, I wondered about that syntax. We now initialize the pthread_mutex_t member
like so:
mutex() : _M_mutex(PTHREAD_MUTEX_INIT) { }
which is not portable. We could add config checks to determine where the INIT
macro is valid, and for some platforms we could use:
mutex() : _M_mutex PTHREAD_MUTEX_INIT { }
But the ideal solution is to get brace-or-equal-initializers implemented for
non-static class members, then we can do:
native_type _M_mutex = PTHREAD_MUTEX_INIT;
mutex() { }