Are any compiler vendors attempting to produce a C11 compiler?

Discussion in 'C Programming' started by Dann Corbit, Jul 10, 2012.

  1. Dann Corbit

    Dann Corbit Guest

    Since C99 support was spotty at best, with even the biggest compiler
    vendors putting very little effort into such a thing, I wonder if C11 is
    a paper-only, hypothetical standard or are there actual compiler vendors
    interested in making a functional C11 compiler.
     
    Dann Corbit, Jul 10, 2012
    #1
    1. Advertising

  2. Dann Corbit

    Jorgen Grahn Guest

    On Tue, 2012-07-10, Dann Corbit wrote:
    > Since C99 support was spotty at best, with even the biggest compiler
    > vendors putting very little effort into such a thing, I wonder if C11 is
    > a paper-only, hypothetical standard or are there actual compiler vendors
    > interested in making a functional C11 compiler.


    Gcc 4.7 has a -std=c11 flag, so I guess the answers are "no" and "yes".

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .
     
    Jorgen Grahn, Jul 10, 2012
    #2
    1. Advertising

  3. Dann Corbit

    Dann Corbit Guest

    In article <>,
    says...
    >
    > On Tue, 2012-07-10, Dann Corbit wrote:
    > > Since C99 support was spotty at best, with even the biggest compiler
    > > vendors putting very little effort into such a thing, I wonder if C11 is
    > > a paper-only, hypothetical standard or are there actual compiler vendors
    > > interested in making a functional C11 compiler.

    >
    > Gcc 4.7 has a -std=c11 flag, so I guess the answers are "no" and "yes".


    How much of the grammar of C11 do they support? Do they also cover the
    optional features? Do they support the new threading nomenclature?

    I have had some problems trying to get the 4.7 version to work properly
    to create 64 bit Windows binaries, so I am not currently using that
    version.
     
    Dann Corbit, Jul 10, 2012
    #3
  4. Dann Corbit

    Jens Gustedt Guest

    Am 10.07.2012 22:52, schrieb Dann Corbit:
    > Since C99 support was spotty at best, with even the biggest compiler
    > vendors putting very little effort into such a thing, I wonder if C11 is
    > a paper-only, hypothetical standard or are there actual compiler vendors
    > interested in making a functional C11 compiler.
    >


    It looks that gcc and clang are actively moving towards implementing it.
    In contrast to C99 some parts of the old and new standard are now
    optional, so this will ease the transition for some compilers.

    Clang is actually already quite advanced in its C11 support, all direct
    language level features seems to be implemented, in particular _Generic
    and _Atomic.

    But as always with these things the required library support is more
    involved, so complete probably still will lack for a certain time. Some
    things are relatively "easy": support for atomics is already there in
    extensions with a different syntax, and implementing C11 threads on top
    of POSIX threads is not very difficult either, a good exercise for an
    experienced programmer.

    Jens
     
    Jens Gustedt, Jul 10, 2012
    #4
  5. Dann Corbit

    Dann Corbit Guest

    In article <>, says...
    >
    > Am 10.07.2012 22:52, schrieb Dann Corbit:
    > > Since C99 support was spotty at best, with even the biggest compiler
    > > vendors putting very little effort into such a thing, I wonder if C11 is
    > > a paper-only, hypothetical standard or are there actual compiler vendors
    > > interested in making a functional C11 compiler.
    > >

    >
    > It looks that gcc and clang are actively moving towards implementing it.
    > In contrast to C99 some parts of the old and new standard are now
    > optional, so this will ease the transition for some compilers.
    >
    > Clang is actually already quite advanced in its C11 support, all direct
    > language level features seems to be implemented, in particular _Generic
    > and _Atomic.
    >
    > But as always with these things the required library support is more
    > involved, so complete probably still will lack for a certain time. Some
    > things are relatively "easy": support for atomics is already there in
    > extensions with a different syntax, and implementing C11 threads on top
    > of POSIX threads is not very difficult either, a good exercise for an
    > experienced programmer.


    Writing your own thread wrapper library is almost certainly a mistake.
    There is the existing ACE wrappers, there is the boost threading API,
    and there is the Pthreads wrapper also (which does not require C++ like
    the other two). All of these are tested and debugged and fairly easy to
    use. It would be nice (of course) to have a single threading API that
    can be used anywhere and this is likely the goal of these compiler
    advances (C++ beat C to the punch in having a standardized threading API
    but it is not universally implemented yet either).

    To roll your own version is another gob of code to maintain that
    supposedly is going to be replaced soon by "the real thing."

    If it never does get replaced then it was a complete waste of effort and
    if it does get replaced then it is a small waste of effort.

    In either case, I think I would train my energies on other portions of
    the project.

    I do most of my real programming in C++. For me, C is for hobby
    programming, mostly chess programs.

    I am, of course, interested in any new language features that make my
    life easier and I am especially interested in them if they actually come
    to fruition.
     
    Dann Corbit, Jul 10, 2012
    #5
  6. On 10-Jul-12 16:26, Dann Corbit wrote:
    > In article <>,
    > says...
    >> On Tue, 2012-07-10, Dann Corbit wrote:
    >>> Since C99 support was spotty at best, with even the biggest compiler
    >>> vendors putting very little effort into such a thing, I wonder if C11 is
    >>> a paper-only, hypothetical standard or are there actual compiler vendors
    >>> interested in making a functional C11 compiler.

    >>
    >> Gcc 4.7 has a -std=c11 flag, so I guess the answers are "no" and "yes".

    >
    > How much of the grammar of C11 do they support? Do they also cover the
    > optional features? Do they support the new threading nomenclature?
    >
    > I have had some problems trying to get the 4.7 version to work properly
    > to create 64 bit Windows binaries, so I am not currently using that
    > version.
    >


    From the GCC documentation:

    > -std=

    ....
    > `c11'
    > `c1x'
    > `iso9899:2011'
    > ISO C11, the 2011 revision of the ISO C standard. Support is
    > incomplete and experimental. The name `c1x' is deprecated.


    A description of "incomplete and experimental", plus the lack of a
    compliance status page as there is for C99, doesn't inspire confidence.

    S

    --
    Stephen Sprunk "God does not play dice." --Albert Einstein
    CCIE #3723 "God is an inveterate gambler, and He throws the
    K5SSS dice at every possible opportunity." --Stephen Hawking
     
    Stephen Sprunk, Jul 11, 2012
    #6
  7. Dann Corbit

    Jens Gustedt Guest

    Am 11.07.2012 00:08, schrieb Dann Corbit:
    > To roll your own version is another gob of code to maintain that
    > supposedly is going to be replaced soon by "the real thing."
    >
    > If it never does get replaced then it was a complete waste of effort and
    > if it does get replaced then it is a small waste of effort.


    If you happen to be on a POSIX system with gcc (clang, icc, opencc,
    ....) you don't have to provide that effort yourself, P99 already wraps
    existing features such that they mostly follow the C11
    interfaces. ("Mostly" for _Generic primary expressions that are
    emulated by P99_GENERIC, because the C11 syntax is not so easy to
    emulate.)

    Have a look at http://p99.gforge.inria.fr/p99-html/group__C11.html

    So on POSIX platforms there is no excuse not to start new projects
    directly with C11 features.

    Jens
     
    Jens Gustedt, Jul 11, 2012
    #7
  8. Dann Corbit

    Jorgen Grahn Guest

    On Tue, 2012-07-10, Stephen Sprunk wrote:
    > On 10-Jul-12 16:26, Dann Corbit wrote:
    >> In article <>,
    >> says...
    >>> On Tue, 2012-07-10, Dann Corbit wrote:
    >>>> Since C99 support was spotty at best, with even the biggest compiler
    >>>> vendors putting very little effort into such a thing, I wonder if C11 is
    >>>> a paper-only, hypothetical standard or are there actual compiler vendors
    >>>> interested in making a functional C11 compiler.
    >>>
    >>> Gcc 4.7 has a -std=c11 flag, so I guess the answers are "no" and "yes".

    >>
    >> How much of the grammar of C11 do they support? Do they also cover the
    >> optional features? Do they support the new threading nomenclature?
    >>
    >> I have had some problems trying to get the 4.7 version to work properly
    >> to create 64 bit Windows binaries, so I am not currently using that
    >> version.
    >>

    >
    > From the GCC documentation:
    >
    >> -std=

    > ...
    >> `c11'
    >> `c1x'
    >> `iso9899:2011'
    >> ISO C11, the 2011 revision of the ISO C standard. Support is
    >> incomplete and experimental. The name `c1x' is deprecated.

    >
    > A description of "incomplete and experimental", plus the lack of a
    > compliance status page as there is for C99, doesn't inspire confidence.


    Particularly that last part, yes. I certainly expected one to exist
    -- the C99 page seems so popular and successful as a way to advertise
    the level of support.

    However, the question was "are there actual compiler vendors
    interested in making a functional C11 compiler?", and the presence of
    a -std=c11 flag surely means they are at least /interested/.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .
     
    Jorgen Grahn, Jul 13, 2012
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Meagher
    Replies:
    8
    Views:
    1,293
    Karl Seguin
    Jun 18, 2005
  2. Replies:
    5
    Views:
    466
    Luc The Perverse
    Oct 27, 2006
  3. Chicken McNuggets

    C11 Compiler Test Suite

    Chicken McNuggets, Sep 14, 2012, in forum: C Programming
    Replies:
    26
    Views:
    1,386
    Stephen Sprunk
    Nov 12, 2012
  4. Varun Tewari
    Replies:
    3
    Views:
    244
    Keith Thompson
    Apr 1, 2013
  5. Chicken McNuggets

    Compiler with best C11 support

    Chicken McNuggets, Jul 30, 2013, in forum: C Programming
    Replies:
    0
    Views:
    251
    Chicken McNuggets
    Jul 30, 2013
Loading...

Share This Page