From mboxrd@z Thu Jan 1 00:00:00 1970 From: "John David Anglin" To: dave@hiauly1.hia.nrc.ca (John David Anglin) Cc: gcc@gcc.gnu.org, aoliva@redhat.com, Sylvain.Pion@sophia.inria.fr Subject: Re: STL warnings recently appeared in the 3.0 branch Date: Thu, 14 Jun 2001 09:58:00 -0000 Message-id: <200106141658.MAA25910@hiauly1.hia.nrc.ca> References: X-SW-Source: 2001-06/msg00823.html > On Jun 14, 2001, Sylvain Pion wrote: > > .../include/g++-v3/bits/stl_alloc.h:494: > > warning: aggregate has a partly bracketed initializer > > I don't get them on GNU-Linux, but they appear on Solaris. > IIRC, this is a bug in Solaris' headers. The initializer for mutexes > defined in some header file triggers this warning. If you are using solaris threads (gthr-solaris.h), the system headers (thread.h) are supposed to define DEFAULTMUTEX. If they don't, the initializer is broken and the STL mutex locking won't work properly. The integration of GTHREADS into v3 is new which is why your seeing the warning. My previous comments probably don't apply to solaris. The file gthr-solaris.h may need to check to see if DEFAULTMUTEX is defined. If it isn't then, some fallback is needed. This could be defining DEFAULTMUTEX, or using __GTHREAD_ONCE_INIT_FUNCTION instead of __GTHREAD_ONCE_INIT. Dave -- J. David Anglin dave.anglin@nrc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6605)