On Fri, Mar 15, 2013 at 1:01 PM, Charles Forsyth
<[email protected]> wrote:
> On 15 March 2013 16:52, Joel C. Salomon <[email protected]> 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).

—Joel

Reply via email to