Threaded implementatioon

Ulrich Drepper drepper@redhat.com
Thu Apr 6 17:23:00 GMT 2000


"Anthony Williams" <anthony_w.geo@yahoo.com> writes:

> Does anyone know how to get rid of the following warning, which
> plagues my C++ code when I compile with -pthreads? (gcc & libstdc++-3
> are installed in /export/home/cms/localtest )
> 
> 
> /export/home/cms/localtest/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/../
> ./../../include/g++-v3/bits/stl_threads.h: At top level:
> /export/home/cms/localtest/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/../
> ./../../include/g++-v3/bits/stl_threads.h: In instantiation of
> `std::_Swap_lock_struct<0>::_S_swap_lock':
> /export/home/cms/localtest/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/../
> ./../../include/g++-v3/bits/stl_threads.h:147:   instantiated from
> here
> /export/home/cms/localtest/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/../
> ./../../include/g++-v3/bits/stl_threads.h:141: warning: aggregate has
> a partly bracketed initializer

Create an appropriate macro PTHREAD_MUTEX_INITIALIZER with all the
required brackets.  The people at Sun cannot do this so you have to do
it.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


More information about the Libstdc++ mailing list