Discussion:
[9fans] ISO C and typestr
(too old to reply)
Joel C. Salomon
2013-03-15 16:52:32 UTC
Permalink
Has anyone presented the 9c extension typestr to the C standardization
committee (WG14)?

Looking at the documents at <http://www.open-std.org/jtc1/sc22/wg14/>,
I see that various vendors have let the committee know about their
extensions, both to offer directions for future standardization and to
ensure that the committee's new ideas don't break existing code based
on those extensions.

BTW, the C11 standard includes a restricted form of 9c's anonymous
sub-structs (with no pointer conversion).

—Joel
Charles Forsyth
2013-03-15 17:01:54 UTC
Permalink
Post by Joel C. Salomon
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?
Joel C. Salomon
2013-03-15 17:09:13 UTC
Permalink
On Fri, Mar 15, 2013 at 1:01 PM, Charles Forsyth
Post by Charles Forsyth
Post by Joel C. Salomon
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

Loading...