9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] ISO C and typestr
@ 2013-03-15 16:52 Joel C. Salomon
  2013-03-15 17:01 ` Charles Forsyth
  0 siblings, 1 reply; 3+ messages in thread
From: Joel C. Salomon @ 2013-03-15 16:52 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] ISO C and typestr
  2013-03-15 16:52 [9fans] ISO C and typestr Joel C. Salomon
@ 2013-03-15 17:01 ` Charles Forsyth
  2013-03-15 17:09   ` Joel C. Salomon
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Forsyth @ 2013-03-15 17:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

On 15 March 2013 16:52, Joel C. Salomon <joelcsalomon@gmail.com> 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?

[-- Attachment #2: Type: text/html, Size: 571 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] ISO C and typestr
  2013-03-15 17:01 ` Charles Forsyth
@ 2013-03-15 17:09   ` Joel C. Salomon
  0 siblings, 0 replies; 3+ messages in thread
From: Joel C. Salomon @ 2013-03-15 17:09 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, Mar 15, 2013 at 1:01 PM, Charles Forsyth
<charles.forsyth@gmail.com> wrote:
> On 15 March 2013 16:52, Joel C. Salomon <joelcsalomon@gmail.com> 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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-15 17:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-15 16:52 [9fans] ISO C and typestr Joel C. Salomon
2013-03-15 17:01 ` Charles Forsyth
2013-03-15 17:09   ` Joel C. Salomon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).