Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #26370 > unrolled thread

C11 Compiler Test Suite

Started byChicken McNuggets <chicken@mcnuggets.com>
First post2012-09-14 22:20 +0100
Last post2012-10-01 23:41 +0000
Articles 10 on this page of 30 — 11 participants

Back to article view | Back to comp.lang.c


Contents

  C11 Compiler Test Suite Chicken McNuggets <chicken@mcnuggets.com> - 2012-09-14 22:20 +0100
    Re: C11 Compiler Test Suite steve.b.hafner@gmail.com - 2012-09-22 08:03 -0700
      Re: C11 Compiler Test Suite Chicken McNuggets <chicken@mcnuggets.com> - 2012-09-26 12:54 +0100
    Re: C11 Compiler Test Suite Kaz Kylheku <kaz@kylheku.com> - 2012-09-26 18:11 +0000
      Re: C11 Compiler Test Suite Chicken McNuggets <chicken@mcnuggets.com> - 2012-09-30 00:22 +0100
        Re: C11 Compiler Test Suite Kaz Kylheku <kaz@kylheku.com> - 2012-09-30 04:14 +0000
          Re: C11 Compiler Test Suite Chicken McNuggets <chicken@mcnuggets.com> - 2012-09-30 14:49 +0100
            Re: C11 Compiler Test Suite Rui Maciel <rui.maciel@gmail.com> - 2012-09-30 15:16 +0100
            Re: C11 Compiler Test Suite James Kuyper <jameskuyper@verizon.net> - 2012-09-30 14:47 -0400
            Re: C11 Compiler Test Suite Keith Thompson <kst-u@mib.org> - 2012-09-30 14:22 -0700
              Re: C11 Compiler Test Suite Chicken McNuggets <chicken@mcnuggets.com> - 2012-10-05 19:33 +0100
                Re: C11 Compiler Test Suite James Kuyper <jameskuyper@verizon.net> - 2012-10-05 14:57 -0400
                  Re: C11 Compiler Test Suite Rui Maciel <rui.maciel@gmail.com> - 2012-10-05 22:07 +0100
                    Re: C11 Compiler Test Suite Chicken McNuggets <chicken@mcnuggets.com> - 2012-10-07 14:04 +0100
                  Re: C11 Compiler Test Suite Robert Miles <milesrf@Usenet-News.net> - 2012-11-12 00:04 -0600
                    Re: C11 Compiler Test Suite James Kuyper <jameskuyper@verizon.net> - 2012-11-12 10:07 -0500
                    Re: C11 Compiler Test Suite Keith Thompson <kst-u@mib.org> - 2012-11-12 10:11 -0800
                    Re: C11 Compiler Test Suite Stephen Sprunk <stephen@sprunk.org> - 2012-11-12 13:27 -0600
                Re: C11 Compiler Test Suite Keith Thompson <kst-u@mib.org> - 2012-10-05 12:07 -0700
                Re: C11 Compiler Test Suite Kaz Kylheku <kaz@kylheku.com> - 2012-10-05 20:25 +0000
                  Re: C11 Compiler Test Suite Rui Maciel <rui.maciel@gmail.com> - 2012-10-05 21:44 +0100
                    Re: C11 Compiler Test Suite Kaz Kylheku <kaz@kylheku.com> - 2012-10-05 21:14 +0000
                      Re: C11 Compiler Test Suite Rui Maciel <rui.maciel@gmail.com> - 2012-10-05 22:32 +0100
                  Re: C11 Compiler Test Suite Chicken McNuggets <chicken@mcnuggets.com> - 2012-10-05 21:49 +0100
                    Re: C11 Compiler Test Suite James Kuyper <jameskuyper@verizon.net> - 2012-10-05 17:37 -0400
                      Re: C11 Compiler Test Suite Robert Wessel <robertwessel2@yahoo.com> - 2012-10-05 17:15 -0500
                        Re: C11 Compiler Test Suite 88888 Dihedral <dihedral88888@googlemail.com> - 2012-10-05 18:47 -0700
                          Re: C11 Compiler Test Suite Robert Wessel <robertwessel2@yahoo.com> - 2012-10-05 21:29 -0500
            Re: C11 Compiler Test Suite Kaz Kylheku <kaz@kylheku.com> - 2012-10-01 21:56 +0000
              Re: C11 Compiler Test Suite pacman@kosh.dhis.org (Alan Curry) - 2012-10-01 23:41 +0000

Page 2 of 2 — ← Prev page 1 [2]


#27050

FromRui Maciel <rui.maciel@gmail.com>
Date2012-10-05 21:44 +0100
Message-ID<k4ngqc$t7f$1@speranza.aioe.org>
In reply to#27049
Kaz Kylheku wrote:

> I can't think of any computational problem that I cannot solve until
> a C11 compiler falls out of the sky and lands in my lap.
> 
> Is there some secret bit manipulation in the CPU that I cannot unlock
> otherwise?

This is a non-argument.  If solving computational problems was the only 
metric then, as it's possible to solve them with programs coded purely in 
assembly, every high level programming language would be as useless as you 
are making C11 out to be.  And this would be a silly thing to say.


> Software development carries risks. Unnecessary software development,
> therefore, carries unnecessary risks.
> 
> If a C11 upgrade to a compiler breaks some user's code which doesn't use
> anything from C11, the net value of that upgrade is negative.

No.  It would mean that you had upgraded to a broken compiler, and that you 
were less than rigorous with your decision to rely on a brand new compiler 
to use in production.  This has absolutely nothing to do with C11.


Rui Maciel

[toc] | [prev] | [next] | [standalone]


#27053

FromKaz Kylheku <kaz@kylheku.com>
Date2012-10-05 21:14 +0000
Message-ID<20121005140453.485@kylheku.com>
In reply to#27050
On 2012-10-05, Rui Maciel <rui.maciel@gmail.com> wrote:
> Kaz Kylheku wrote:
>
>> I can't think of any computational problem that I cannot solve until
>> a C11 compiler falls out of the sky and lands in my lap.
>> 
>> Is there some secret bit manipulation in the CPU that I cannot unlock
>> otherwise?
>
> This is a non-argument.  If solving computational problems was the only 
> metric then, as it's possible to solve them with programs coded purely in 
> assembly, every high level programming language would be as useless as you 
> are making C11 out to be.  And this would be a silly thing to say.

If expressivity and power are also metrics, then some piffling upgrades to high
level languages do look genuinely useless.

[toc] | [prev] | [next] | [standalone]


#27054

FromRui Maciel <rui.maciel@gmail.com>
Date2012-10-05 22:32 +0100
Message-ID<k4njlr$4rt$1@speranza.aioe.org>
In reply to#27053
Kaz Kylheku wrote:

> If expressivity and power are also metrics, then some piffling upgrades to
> high level languages do look genuinely useless.

They can't be metrics because they are vague to the point they are 
essentially meaningless.  We are referring to a set of features which might 
be useful to some people, anf if C11 isn't supported then we simply can't 
rely on them to exist.  

You can spend hours discussing your indifference towards the features 
introduced in C11, but you need to understand that that's only your 
subjective opinion on a subject.  Meanwhile, depriving the world of those 
features is something which isn't adequately justified with an uninformed 
"meh".


Rui Maciel

[toc] | [prev] | [next] | [standalone]


#27051

FromChicken McNuggets <chicken@mcnuggets.com>
Date2012-10-05 21:49 +0100
Message-ID<k4nh2t$tuc$1@speranza.aioe.org>
In reply to#27049
On 05/10/2012 21:25, Kaz Kylheku wrote:
> On 2012-10-05, Chicken McNuggets <chicken@mcnuggets.com> wrote:
>> On 30/09/2012 22:22, Keith Thompson wrote:
>>
>>> Having said all that, I personally would like to see much better
>>> support for the current C standard, and I find, for example,
>>> Microsoft's decision not to support either C99 or C11 annoying.
>>> But Microsoft doesn't get enough money from me for my opinion to
>>> be very relevant to them.
>>>
>>
>> I take on board the possibility that I am being overly pedantic but the
>> point of the original post that lead to this somewhat off-topic
>> discussion was the intention to get more C compilers to support the full
>> C11 standard irrespective of whether they also continue to support
>> previous C standards (via the common -std=cxx compiler switch).
>
> I can't think of any computational problem that I cannot solve until
> a C11 compiler falls out of the sky and lands in my lap.
>
> Is there some secret bit manipulation in the CPU that I cannot unlock
> otherwise?

The point is not whether you can perform some task with previous C 
standards or not. It is whether you can perform those tasks in an easier 
manner. For instance threading in C11 promises to be much easier as you 
will have a threading library that is cross platform compatible built 
into the language itself rather than having to rely on third party 
implementations. Writing code that works on Windows and UNIX will be 
much easier.

No one is claiming that C99, C90 or even K&R C are not Turing complete 
the point is just that additional language features make certain 
development tasks easier.

>
>> I fail to see how trying to get more compilers to fully support the C11
>> standard is a bad thing.
>
> Software development carries risks. Unnecessary software development,
> therefore, carries unnecessary risks.
>
> If a C11 upgrade to a compiler breaks some user's code which doesn't use
> anything from C11, the net value of that upgrade is negative.
>

I would be highly surprised if an upgrade to C11 in a compiler would 
break existing code especially as most compilers (all that I know of) 
allow you to specify the standard you wish to compile your code against 
(with the -std=cxx command line switch).

If it was shown that a particular compiler broke existing code due to an 
upgrade to C11 I would imagine that the compiler vendor would treat that 
problem with the up-most priority.

Regardless refusing to implement modern standards because of the risk of 
problems seems somewhat short sighted. There are always risks no matter 
what you are doing. Life is all about making decisions based on the 
possible risk and the eventual benefit. Personally I feel that 
implementing C11 is worth the (small) risk.

Let us not forget that C compiler vendors are used to implementing new C 
standards. They did it when they transitioned from K&R to ANSI (with the 
possible C90 and C94 being in there depending on whether you count them 
as actual standards or merely just modifications of existing standards) 
then to C99 and now to C11.

[toc] | [prev] | [next] | [standalone]


#27055

FromJames Kuyper <jameskuyper@verizon.net>
Date2012-10-05 17:37 -0400
Message-ID<506F532A.6010201@verizon.net>
In reply to#27051
On 10/05/2012 04:49 PM, Chicken McNuggets wrote:
> On 05/10/2012 21:25, Kaz Kylheku wrote:
>> On 2012-10-05, Chicken McNuggets <chicken@mcnuggets.com> wrote:
>>> On 30/09/2012 22:22, Keith Thompson wrote:
...
> The point is not whether you can perform some task with previous C 
> standards or not. It is whether you can perform those tasks in an easier 
> manner.

"Allows performing tasks to be performed more easily" != "essential".
There's only a few specialized tasks that can be performed more easily
in C2011 than in C99. It's not even as big of a change as C99 was, and
that was a fairly minor update.

> For instance threading in C11 promises to be much easier as you 
> will have a threading library that is cross platform compatible built 
> into the language itself rather than having to rely on third party 
> implementations. Writing code that works on Windows and UNIX will be 
> much easier.

Will it? I don't write multi-threaded code at all, so I have no idea.
But I know that <threads.h> only implements a sub-set of the features of
either POSIX pthreads, or the Windows equivalent (I've no idea what it's
name is). What fraction of current multi-threaded programs use only
those features of POSIX (or Windows) for which there's a <threads.h>
equivalent?

...
> I would be highly surprised if an upgrade to C11 in a compiler would 
> break existing code especially as most compilers (all that I know of) 
> allow you to specify the standard you wish to compile your code against 
> (with the -std=cxx command line switch).

You haven't actually upgraded to C2011, even if your compiler supports
it, if you need to use -std=c99 to make your code compile.

> If it was shown that a particular compiler broke existing code due to an 
> upgrade to C11 I would imagine that the compiler vendor would treat that 
> problem with the up-most priority.

Many of the new features of C99 that were mandatory are now optional in
C2011. If a vendor took advantage of that fact to cease supporting one
of those features, I doubt that they would consider the lack of support
to be a problem of any kind, much less a high priority one. That
wouldn't make code that used those features any less broken.

...
> Let us not forget that C compiler vendors are used to implementing new C 
> standards. ... 

Not really - for most of them, the last time they fully implemented a
new C standard was 1995 or earlier. Even the more up-to-date compilers
haven't had to implement a new C standard since 2000, which is a fairly
long time in the IT world. Many of the people who did the design work in
2000 may have either retired, been laid off, or been promoted into
management by now.

[toc] | [prev] | [next] | [standalone]


#27056

FromRobert Wessel <robertwessel2@yahoo.com>
Date2012-10-05 17:15 -0500
Message-ID<1lmu68te0lqnsm55taqfdkl9bfhpuo7mlu@4ax.com>
In reply to#27055
On Fri, 05 Oct 2012 17:37:46 -0400, James Kuyper
<jameskuyper@verizon.net> wrote:

>On 10/05/2012 04:49 PM, Chicken McNuggets wrote:

>> If it was shown that a particular compiler broke existing code due to an 
>> upgrade to C11 I would imagine that the compiler vendor would treat that 
>> problem with the up-most priority.
>
>Many of the new features of C99 that were mandatory are now optional in
>C2011. If a vendor took advantage of that fact to cease supporting one
>of those features, I doubt that they would consider the lack of support
>to be a problem of any kind, much less a high priority one. That
>wouldn't make code that used those features any less broken.


I suppose it depends on how you count, but the only mandatory C99
features that are optional in C11 are complex support and VLAs.

I must admit I don't get the opposition to complex support (and that
was even optional for freestanding C99 implementations).  The compiler
support needed is so minimal.  For VLAs I can at least imagine
platforms where support would be excessively difficult.

[toc] | [prev] | [next] | [standalone]


#27058

From88888 Dihedral <dihedral88888@googlemail.com>
Date2012-10-05 18:47 -0700
Message-ID<a0029506-19ed-4301-a518-28de0ff4c941@googlegroups.com>
In reply to#27056
robert...@yahoo.com於 2012年10月6日星期六UTC+8上午6時15分35秒寫道:
> On Fri, 05 Oct 2012 17:37:46 -0400, James Kuyper
> 
> <jameskuyper@verizon.net> wrote:
> 
> 
> 
> >On 10/05/2012 04:49 PM, Chicken McNuggets wrote:
> 
> 
> 
> >> If it was shown that a particular compiler broke existing code due to an 
> 
> >> upgrade to C11 I would imagine that the compiler vendor would treat that 
> 
> >> problem with the up-most priority.
> 
> >
> 
> >Many of the new features of C99 that were mandatory are now optional in
> 
> >C2011. If a vendor took advantage of that fact to cease supporting one
> 
> >of those features, I doubt that they would consider the lack of support
> 
> >to be a problem of any kind, much less a high priority one. That
> 
> >wouldn't make code that used those features any less broken.
> 
> 
> 
> 
> 
> I suppose it depends on how you count, but the only mandatory C99
> 
> features that are optional in C11 are complex support and VLAs.
> 
> 
> 
> I must admit I don't get the opposition to complex support (and that
> 
> was even optional for freestanding C99 implementations).  The compiler
> 
> support needed is so minimal.  For VLAs I can at least imagine
> 
> platforms where support would be excessively difficult.

Well if there are  no new  cpus with some new instruction sets in a few years, 
the  GCC 90 and 99 standards are good enough for those old instruction sets.

[toc] | [prev] | [next] | [standalone]


#27059

FromRobert Wessel <robertwessel2@yahoo.com>
Date2012-10-05 21:29 -0500
Message-ID<in5v68dgai3ulhsid98sn6eh879on8jbvb@4ax.com>
In reply to#27058
On Fri, 5 Oct 2012 18:47:44 -0700 (PDT), 88888 Dihedral
<dihedral88888@googlemail.com> wrote:

>robert...@yahoo.com? 2012?10?6????UTC+8??6?15?35????
>> On Fri, 05 Oct 2012 17:37:46 -0400, James Kuyper
>> 
>> <jameskuyper@verizon.net> wrote:
>> 
>> 
>> 
>> >On 10/05/2012 04:49 PM, Chicken McNuggets wrote:
>> 
>> 
>> 
>> >> If it was shown that a particular compiler broke existing code due to an 
>> 
>> >> upgrade to C11 I would imagine that the compiler vendor would treat that 
>> 
>> >> problem with the up-most priority.
>> 
>> >
>> 
>> >Many of the new features of C99 that were mandatory are now optional in
>> 
>> >C2011. If a vendor took advantage of that fact to cease supporting one
>> 
>> >of those features, I doubt that they would consider the lack of support
>> 
>> >to be a problem of any kind, much less a high priority one. That
>> 
>> >wouldn't make code that used those features any less broken.
>> 
>> 
>> 
>> 
>> 
>> I suppose it depends on how you count, but the only mandatory C99
>> 
>> features that are optional in C11 are complex support and VLAs.
>> 
>> 
>> 
>> I must admit I don't get the opposition to complex support (and that
>> 
>> was even optional for freestanding C99 implementations).  The compiler
>> 
>> support needed is so minimal.  For VLAs I can at least imagine
>> 
>> platforms where support would be excessively difficult.
>
>Well if there are  no new  cpus with some new instruction sets in a few years, 
>the  GCC 90 and 99 standards are good enough for those old instruction sets.


A number of the very small embedded processors in common use (and
programmed in something at least approximating C) would have
considerable difficulty supporting anything like VLAs.

[toc] | [prev] | [next] | [standalone]


#26940

FromKaz Kylheku <kaz@kylheku.com>
Date2012-10-01 21:56 +0000
Message-ID<20121001145001.645@kylheku.com>
In reply to#26885
On 2012-09-30, Chicken McNuggets <chicken@mcnuggets.com> wrote:
> On 30/09/2012 05:14, Kaz Kylheku wrote:
>> On 2012-09-29, Chicken McNuggets <chicken@mcnuggets.com> wrote:
>>> On 26/09/2012 19:11, Kaz Kylheku wrote:
>>>> On 2012-09-14, Chicken McNuggets <chicken@mcnuggets.com> wrote:
>>>>> It is essential that the C community makes some noise about C11 support
>>>>
>>>> No, it isn't. Not only is is not essential, it is counterproductive.
>>>> The "C community" should just go about its business and not mess with its
>>>> compilers or libraries, except in those areas where they are foudn to be
>>>> broken.
>>>>
>>>
>>> If a compiler does not follow the standard (and that includes the latest
>>> standard) then I would argue that the compiler is broken.
>>
>> You would argue, but you'd be wrong. Something is broken if it doesn't
>> implement its specification. The choice of specification is the implementor's
>> privilege.  If someone writes a compiler that is documented as conforming to
>> ISO 9899:1990, and it does exactly that, then it's not broken in any way.
>
> This is incorrect the C11 standard states explicitly:

I did not write anything incorrect ...

> "This third edition cancels and replaces the second edition, ISO/IEC 
> 9899:1999, as
> corrected by ISO/IEC 9899:1999/Cor 1:2001, ISO/IEC 9899:1999/Cor 2:2004, and
> ISO/IEC 9899:1999/Cor 3:2007."
>
> thus the only way to be standards compliant is by supporting the latest 
> standard.

.. because I was addressing myself to the term "broken", and did not
write a single word about the term "standards compliant".

> If you only support C90 or C99 then you are not standards 
> compliant as the C11 standard explicitly states it cancels and replaces 
> all previous standards. Likewise C99 stated that it canceled and 
> replaced C90.

That does not make existing copies of C90 spontaneously combust.
People continue to have old documents in their libraries.

So there continues to be a C90 language, with a defining document. We can write
something which conforms to that document.

Whether the result is called "standard conforming" is about as important as 
debating how many angels you can fit on on top of the head of a modern day
comp.lang.c regular.

[toc] | [prev] | [next] | [standalone]


#26946

Frompacman@kosh.dhis.org (Alan Curry)
Date2012-10-01 23:41 +0000
Message-ID<k4d9ni$bhq$1@speranza.aioe.org>
In reply to#26940
In article <20121001145001.645@kylheku.com>,
Kaz Kylheku  <kaz@kylheku.com> wrote:
>On 2012-09-30, Chicken McNuggets <chicken@mcnuggets.com> wrote:
>
>> If you only support C90 or C99 then you are not standards 
>> compliant as the C11 standard explicitly states it cancels and replaces 
>> all previous standards. Likewise C99 stated that it canceled and 
>> replaced C90.
>
>That does not make existing copies of C90 spontaneously combust.

Careful, Amazon might read that as a feature request for the next Kindle.

-- 
Alan Curry

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.c


csiph-web