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: "Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de>
- Subject: Re: partly bracketed initializer ?
- From: Alexandre Oliva <oliva@dcc.unicamp.br>
- Date: 20 Feb 1999 23:34:32 -0200
- 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: "Martin v. Loewis"'s message of "Sat, 20 Feb 1999 17:26:07 +0100"
- 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> <199902201626.RAA10899@mira.isdn.cs.tu-berlin.de>
- Sender: owner-egcs@egcs.cygnus.com
- Sender: oliva@araguaia.dcc.unicamp.br
- User-Agent: Gnus/5.070077 (Pterodactyl Gnus v0.77) XEmacs/20.4 (Emerald)
On Feb 20, 1999, "Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de> wrote:
> 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.
Dunno, but based on ISO C++ [dcl.init.aggr]/11, egcs seems to be right.
--
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