From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Thu, 4 Dec 2008 14:56:08 +0000 From: "roger peppe" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> In-Reply-To: <5f37b0148ff579ae7660653961a9dde0@plan9.cs.bell-labs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <599f06db0812040407g59ee4feejc79ce8ecdec30451@mail.gmail.com> <599f06db0812040426u435f5a9dx7c1c0209c333db53@mail.gmail.com> <5f37b0148ff579ae7660653961a9dde0@plan9.cs.bell-labs.com> Subject: Re: [9fans] initialization of anonymous structs. Topicbox-Message-UUID: 58ee81b4-ead4-11e9-9d60-3106f5b1d025 On Thu, Dec 4, 2008 at 12:33 PM, Sape Mullender wrote: > B bvar = { > .B = { > .a1 = 2, > .b1 = 2, > }, > }; that doesn't work for me. i get: x.c:18 structure element not found B x.c:18 more initializers than structure: bvar changing the .B to .A doesn't work either, nor does {.A = {.a1 = 3}, .b1 = 4} which intuitively (without looking at the compiler code) seems the most likely to work...