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 ?


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

I'm not so sure whether this is all Sun's fault. The initializer
provides three zeroes, for the three fields of the outermost
structure. How would a K&R compiler be interpreting this? gcc
initializes three bytes of the depth-first structure, which I find an
interesting interpretation of the initializer.

Regards,
Martin


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