Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Where to download C99 Standard

Reply
Thread Tools

Where to download C99 Standard

 
 
Seebs
Guest
Posts: n/a
 
      01-03-2011
On 2011-01-03, Chris H <(E-Mail Removed)> wrote:
> So what I think ISO is looking at doing is making optional the things
> that "most" compilers don't use. So we can get back to a core language
> that everyone uses.


That makes sense. And much though I like VLAs, I do see foundational
problems with using them in some domains, so I can see them being a thing
not everyone uses.

That said, I'd distinguish between "most compilers don't use them" and
"a few compilers don't use them". I don't know that I've seen a compiler
in a long time that doesn't support VLAs. I suppose MS's doesn't, but
I have had such consistently negative experiences with their compilers
that I really, really, don't care what they support.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
 
Reply With Quote
 
 
 
 
jacob navia
Guest
Posts: n/a
 
      01-03-2011
Le 03/01/11 21:25, Richard a écrit :
> Seebs<(E-Mail Removed)> writes:
>
>> On 2011-01-03, Chris H<(E-Mail Removed)> wrote:
>>> So what I think ISO is looking at doing is making optional the things
>>> that "most" compilers don't use. So we can get back to a core language
>>> that everyone uses.

>
>>
>> That makes sense. And much though I like VLAs, I do see foundational
>> problems with using them in some domains, so I can see them being a thing
>> not everyone uses.

>
> You can "see" that can you?
>
> Amazing.
>
> Probably about 1% of C programs use them.
>
> You're amazing!


VLAs allow you to use exactly as much memory as you need, not
more, not less. This way you use the stack sparingly. Instead of

int table[MAXLENGTH];

that will be too big in 99% of the cases you just use as much stack
as you actually need.

But obviously, since "THERE IS NO STACK IN C" and "C HAS NO STACK"
etc, they are useless.



 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      01-03-2011
Chris H <(E-Mail Removed)> writes:
> In message <(E-Mail Removed)>, Seebs
> <(E-Mail Removed)> writes
>>On 2011-01-03, Chris H <(E-Mail Removed)> wrote:
>>> So which compilers are C99 compliant? Many do some bits of C99 but there
>>> are very few, and AFAIK no mainstream compilers, that are fully C99
>>> compliant.

>>
>>Well, that turns out not to matter. pseudo "requires C99", only of course
>>it doesn't, it just requires a few specific features (the C99 version of
>>the struct hack, designated initializers, and one or two others as I recall).
>>
>>But since those features are in every implementation I care about, whatever.

>
> That is my point. No one fully implemented C99. Most implemented "some"
> features"
>
> So what I think ISO is looking at doing is making optional the things
> that "most" compilers don't use. So we can get back to a core language
> that everyone uses.


By "compilers don't use, do you mean "compilers don't implement", or
"programmers don't use"?

Was the choice of these two particular features, complex types and VLAs,
made more on the basis of use by programmers than on the basis of
support by compilers?

> The 2004 C-Bed proposal was to have a small (C95 like) core and make
> additional things optional in various appendices. So all compilers
> could then validate to C-XX "with Appendix 1,3,6" etc as required.


I don't think I've ever heard of this "2004 C-Bed proposal". Can you
provide a reference to it?

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Chris H
Guest
Posts: n/a
 
      01-03-2011
In message <(E-Mail Removed)>, Keith Thompson <kst-
(E-Mail Removed)> writes
>Chris H <(E-Mail Removed)> writes:
>> In message <(E-Mail Removed)>, Seebs
>> <(E-Mail Removed)> writes
>>>On 2011-01-03, Chris H <(E-Mail Removed)> wrote:
>>>> So which compilers are C99 compliant? Many do some bits of C99 but there
>>>> are very few, and AFAIK no mainstream compilers, that are fully C99
>>>> compliant.
>>>
>>>Well, that turns out not to matter. pseudo "requires C99", only of course
>>>it doesn't, it just requires a few specific features (the C99 version of
>>>the struct hack, designated initializers, and one or two others as I recall).
>>>
>>>But since those features are in every implementation I care about, whatever.

>>
>> That is my point. No one fully implemented C99. Most implemented "some"
>> features"
>>
>> So what I think ISO is looking at doing is making optional the things
>> that "most" compilers don't use. So we can get back to a core language
>> that everyone uses.

>
>By "compilers don't use, do you mean "compilers don't implement", or
>"programmers don't use"?


Compilers don't implement


>Was the choice of these two particular features, complex types and VLAs,
>made more on the basis of use by programmers than on the basis of
>support by compilers?


No idea.

>> The 2004 C-Bed proposal was to have a small (C95 like) core and make
>> additional things optional in various appendices. So all compilers
>> could then validate to C-XX "with Appendix 1,3,6" etc as required.

>
>I don't think I've ever heard of this "2004 C-Bed proposal". Can you
>provide a reference to it?


Not externally. It is on my hard drive and we discussed it in the UK.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      01-03-2011
Chris H <(E-Mail Removed)> writes:
> In message <(E-Mail Removed)>, Keith Thompson <kst-
> (E-Mail Removed)> writes
>>Chris H <(E-Mail Removed)> writes:
>>> In message <(E-Mail Removed)>, Seebs
>>> <(E-Mail Removed)> writes
>>>>On 2011-01-03, Chris H <(E-Mail Removed)> wrote:
>>>>> So which compilers are C99 compliant? Many do some bits of C99 but there
>>>>> are very few, and AFAIK no mainstream compilers, that are fully C99
>>>>> compliant.
>>>>
>>>>Well, that turns out not to matter. pseudo "requires C99", only of course
>>>>it doesn't, it just requires a few specific features (the C99 version of
>>>>the struct hack, designated initializers, and one or two others as I recall).
>>>>
>>>>But since those features are in every implementation I care about, whatever.
>>>
>>> That is my point. No one fully implemented C99. Most implemented "some"
>>> features"
>>>
>>> So what I think ISO is looking at doing is making optional the things
>>> that "most" compilers don't use. So we can get back to a core language
>>> that everyone uses.

>>
>>By "compilers don't use, do you mean "compilers don't implement", or
>>"programmers don't use"?

>
> Compilers don't implement


Ok, so what exactly did you mean?

>>Was the choice of these two particular features, complex types and VLAs,
>>made more on the basis of use by programmers than on the basis of
>>support by compilers?

>
> No idea.


I'm surprised by that. I would have thought you'd have been part of
the discussion.

>>> The 2004 C-Bed proposal was to have a small (C95 like) core and make
>>> additional things optional in various appendices. So all compilers
>>> could then validate to C-XX "with Appendix 1,3,6" etc as required.

>>
>>I don't think I've ever heard of this "2004 C-Bed proposal". Can you
>>provide a reference to it?

>
> Not externally. It is on my hard drive and we discussed it in the UK.


--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Marcin Grzegorczyk
Guest
Posts: n/a
 
      01-04-2011
Chris H wrote:
> Everyone has done partial implementations (including GCC). No one in the
> main stream has done full implementations. The problem is the C99 added
> a hell of a lot of stuff no one wanted.


IMHO, GCC clearly aims for a full implementation. The problem is, some
C99 features require a pretty intimate relationship between the compiler
(including the preprocessor) and the library, which does not sit well
with the traditional GCC's "library is someone else's problem" model;
math_errhandling and the standard pragmas are good examples.
--
Marcin Grzegorczyk
 
Reply With Quote
 
Marcin Grzegorczyk
Guest
Posts: n/a
 
      01-04-2011
Keith Thompson wrote:
> Are there plans to make any more C99 features optional, or will it
> be just VLAs and complex types?


The two relevant documents are:
http://www.open-std.org/jtc1/sc22/wg...docs/n1460.htm
http://www.open-std.org/jtc1/sc22/wg...docs/n1471.htm

At the Colorado 2010 meeting, N1460 was accepted (so that's what is in
the latest draft) and N1471 was directed for review; so far, I haven't
seen any information on whether it is going to be put forward again.
--
Marcin Grzegorczyk
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      01-04-2011
Marcin Grzegorczyk <(E-Mail Removed)> writes:
> Keith Thompson wrote:
>> Are there plans to make any more C99 features optional, or will it
>> be just VLAs and complex types?

>
> The two relevant documents are:
> http://www.open-std.org/jtc1/sc22/wg...docs/n1460.htm
> http://www.open-std.org/jtc1/sc22/wg...docs/n1471.htm
>
> At the Colorado 2010 meeting, N1460 was accepted (so that's what is in
> the latest draft) and N1471 was directed for review; so far, I haven't
> seen any information on whether it is going to be put forward again.


Thanks!

I have some comments on the wording, which I'll post to comp.std.c.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Chris H
Guest
Posts: n/a
 
      01-04-2011
In message <iftsd7$63p$(E-Mail Removed)-september.org>, Marcin Grzegorczyk
<(E-Mail Removed)> writes
>Chris H wrote:
>> Everyone has done partial implementations (including GCC). No one in the
>> main stream has done full implementations. The problem is the C99 added
>> a hell of a lot of stuff no one wanted.

>
>IMHO, GCC clearly aims for a full implementation.


And fails.

>The problem is, some C99 features require a pretty intimate
>relationship between the compiler (including the preprocessor) and the
>library, which does not sit well with the traditional GCC's "library is
>someone else's problem" model; math_errhandling and the standard
>pragmas are good examples.


Yes which is why for most targets gcc is a poor choice.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



 
Reply With Quote
 
Chris H
Guest
Posts: n/a
 
      01-04-2011
In message <(E-Mail Removed)>, Keith Thompson <kst-
(E-Mail Removed)> writes
>
>>>Was the choice of these two particular features, complex types and VLAs,
>>>made more on the basis of use by programmers than on the basis of
>>>support by compilers?

>>
>> No idea.

>
>I'm surprised by that. I would have thought you'd have been part of
>the discussion.


I have been far too busy with work and MISRA-C to keep up with every
detail of ISO-C these days also one of the MISRA team who has more time
is watching the details of ISO.


--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between "library parts" of C99 and "language parts" of C99 albert.neu@gmail.com C Programming 3 03-31-2007 08:14 PM
C99 standard anybody has? Rahul C Programming 14 03-20-2007 09:17 PM
C99 struct initialization (C99/gcc) jilerner@yahoo.com C Programming 3 02-20-2006 04:41 AM
How to check whether my GCC compiler support C99 standard or not? Peng Yu C++ 2 09-29-2004 04:09 PM
C99 Standard, arrays of size omitted Peteris Krumins C Programming 1 06-28-2003 01:23 AM



Advertisments