This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: partly bracketed initializer ?


On Feb 20, 1999, Bob McWhirter <bob@werken.com> wrote:

> 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?

It's an initializer that is missing initializer for some members.
Looks like the pthread_mutex_initializer from pthread.h on Solaris
isn't good enough for pthread_mutex_t as defined there.  In fact, it's 
not initializing all members.

> Should I be concerned?

Nope, because uninitialized members are zero-initialized anyway.

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

If there is such an option, that's what you want.

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]