This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

partly bracketed initializer ?




Howdy--

egcs-1.1.1 on Solaris 2.5.1.

If I -D_PTHREADS on my compile lines, and use -Wall, I get
warnings such as :

/usr/local/gnu/include/g++/stl_alloc.h: In instantiation of `__default_alloc_template<true,0>::__node_allocator_lock':
/usr/local/gnu/include/g++/stl_alloc.h:383:   instantiated from `__default_alloc_template<true,0>::lock::~lock<true, 0>()'
/usr/local/gnu/include/g++/stl_alloc.h:404:   instantiated from `__default_alloc_template<true,0>::allocate<true, 0>(unsigned int)'
/usr/local/gnu/include/g++/std/bastring.cc:33:   instantiated from `basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >::Rep::operator new<char, string_char_traits<char>, alloc>(unsigned int, unsigned int)'
/usr/local/gnu/include/g++/std/bastring.cc:60:   instantiated from `basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >::Rep::create<char, string_char_traits<char>, alloc>(unsigned int)'
/usr/local/gnu/include/g++/std/bastring.cc:71:   instantiated from `basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >::Rep::clone<char, string_char_traits<char>, alloc>()'
/usr/local/gnu/include/g++/std/bastring.h:75:   instantiated from here
/usr/local/gnu/include/g++/stl_alloc.h:565: warning: aggregate has a partly bracketed initializer
/usr/local/gnu/include/g++/stl_alloc.h:565: warning: aggregate has a partly bracketed initializer

The code in question looks like:

#ifdef __STL_PTHREADS
    template <bool threads, int inst>
    pthread_mutex_t
    __default_alloc_template<threads, inst>::__node_allocator_lock
        = PTHREAD_MUTEX_INITIALIZER;
#endif


Where PTHREAD_MUTEX_INITAILIZER is defined in /usr/include/pthread.h

	as

#define       PTHREAD_MUTEX_INITIALIZER       {0, 0, 0}       /* = DEFAULTMUTEX */

So I'm wondering...

What is a partly bracketed initializer warning?

Should I be concerned?

Is the a -Wno-bracketed-initializer to turn them off if I'm 
not concerned?

Thanks for taking the time.

-Bob