From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 15 Mar 2013 13:09:13 -0400 Message-ID: From: "Joel C. Salomon" To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] ISO C and typestr Topicbox-Message-UUID: 2a9cba3e-ead8-11e9-9d60-3106f5b1d025 On Fri, Mar 15, 2013 at 1:01 PM, Charles Forsyth wrote: > On 15 March 2013 16:52, Joel C. Salomon wrote: >> BTW, the C11 standard includes a restricted form of 9c's anonymous >> sub-structs (with no pointer conversion). > > isn't the pointer conversion most of the point of them? Given this code: typedef struct Foo Foo; struct Foo { int flag; Lock; } *foo; C11 allows you to write `lock(foo->Lock)`, or to directly access named members of `struct Lock` as if they were members of `struct Foo`. An early draft of the feature did allow `lock(foo)`, but that was rejected (I don't know why). =E2=80=94Joel