Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!jade!ucbcad!ames!hao!oddjob!mimsy!cvl!umd5!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: initialization of unions Message-ID: <6604@brl-smoke.ARPA> Date: Thu, 29-Oct-87 23:17:46 EST Article-I.D.: brl-smok.6604 Posted: Thu Oct 29 23:17:46 1987 Date-Received: Wed, 4-Nov-87 05:31:57 EST References: <165600017@uiucdcsb> <4237@ccv.bbn.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 15 In article <4237@ccv.bbn.COM> kgregory@ccy.bbn.com (Keith D Gregory) writes: >ANSI C has a specific way of initializing unions, which, as I recall is so >ambiguously worded as to be almost useless (allow 20 minutes to decipher :-) There is nothing ambiguous about initializing unions specifically; however, many people have had trouble understanding the rules for incompletely { } bracketed initializer lists for aggregates in general, and that part of the wording in the draft proposed Standard is being revised. (The problem is that it is not clear from the former rules whether the initializer list should be parsed "bottom up" or "top down".) >... unions are initialized as if you were initializing their first element. Yes. First member, actually.