Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.c

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-10-2012, 08:52 PM
Dann Corbit
Guest
 
Posts: n/a
Default Are any compiler vendors attempting to produce a C11 compiler?

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.
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 07-10-2012, 09:14 PM
Jorgen Grahn
Guest
 
Posts: n/a
Default Re: Are any compiler vendors attempting to produce a C11 compiler?

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 .
Reply With Quote
  #3 (permalink)  
Old 07-10-2012, 09:26 PM
Dann Corbit
Guest
 
Posts: n/a
Default Re: Are any compiler vendors attempting to produce a C11 compiler?

In article <slrnjvp6ov.rk7.grahn+nntp@frailea.sa.invalid>,
grahn+nntp@snipabacken.se 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.

Reply With Quote
  #4 (permalink)  
Old 07-10-2012, 09:33 PM
Jens Gustedt
Guest
 
Posts: n/a
Default Re: Are any compiler vendors attempting to produce a C11 compiler?

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
Reply With Quote
  #5 (permalink)  
Old 07-10-2012, 10:08 PM
Dann Corbit
Guest
 
Posts: n/a
Default Re: Are any compiler vendors attempting to produce a C11 compiler?

In article <4FFC9FB6.6080909@loria.fr>, jens.gustedt@loria.fr 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.
Reply With Quote
  #6 (permalink)  
Old 07-10-2012, 11:53 PM
Stephen Sprunk
Guest
 
Posts: n/a
Default Re: Are any compiler vendors attempting to produce a C11 compiler?

On 10-Jul-12 16:26, Dann Corbit wrote:
> In article <slrnjvp6ov.rk7.grahn+nntp@frailea.sa.invalid>,
> grahn+nntp@snipabacken.se 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
Reply With Quote
  #7 (permalink)  
Old 07-11-2012, 05:41 AM
Jens Gustedt
Guest
 
Posts: n/a
Default Re: Are any compiler vendors attempting to produce a C11 compiler?

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
Reply With Quote
  #8 (permalink)  
Old 07-13-2012, 01:05 PM
Jorgen Grahn
Guest
 
Posts: n/a
Default Re: Are any compiler vendors attempting to produce a C11 compiler?

On Tue, 2012-07-10, Stephen Sprunk wrote:
> On 10-Jul-12 16:26, Dann Corbit wrote:
>> In article <slrnjvp6ov.rk7.grahn+nntp@frailea.sa.invalid>,
>> grahn+nntp@snipabacken.se 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 .
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 08:53 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.