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 ?
- To: oliva@dcc.unicamp.br
- Subject: Re: partly bracketed initializer ?
- From: "Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de>
- Date: Sat, 20 Feb 1999 17:26:07 +0100
- CC: bob@werken.com, egcs@egcs.cygnus.com
- Delivered-To: listarch-egcs@egcs.cygnus.com
- Delivered-To: mailing list egcs@egcs.cygnus.com
- In-reply-to: <or4soh5qcc.fsf@araguaia.dcc.unicamp.br> (message from AlexandreOliva on 20 Feb 1999 08:20:19 -0200)
- Mailing-List: contact egcs-help@egcs.cygnus.com; run by ezmlm
- References: <Pine.LNX.3.96.990220032655.7438P-100000@exeter.exeter.org> <or4soh5qcc.fsf@araguaia.dcc.unicamp.br>
- Sender: owner-egcs@egcs.cygnus.com
- User-Agent: SEMI/1.8.6 (Fukuoka) FLIM/1.9.2 (Shin-Tanabe) Emacs/20.3 (with unibyte mode)
> 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