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]

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