Draft standards OK for new compiler and libc?

std c

Draft standards OK for new compiler and libc?

Postby James Buchanan » Mon, 24 Oct 2005 02:16:07 GMT

I was wondering whether there is much difference between the draft standards
of C and the official ISO published standards.

For example, would the draft standard be good enough to go on when writing a
new ISO Standard C compiler and C library?  Could the drafts be used as a
reference when writing C programs without any problems caused by
differences between the draft and the standard?

Thank you,

-- 
James Buchanan

Re: Draft standards OK for new compiler and libc?

Postby Keith Thompson » Mon, 24 Oct 2005 02:46:59 GMT

James Buchanan < XXXX@XXXXX.COM > writes:

For writing programs, a draft is probably good enough.  Assuming a
compiler that conforms to the actual standard, if the program depends
on anything in the draft that differs from the standard, you're likely
to get a diagnostic from the compiler.  (Consider this an invitation
to post counterexamples.)

If you're going to try to implement an ISO standard compliant compiler
and library, though, it would be insane not to spend $18 for a PDF
copy of the actual standard.

There is a post-C99 draft, n1124, but you should still have a copy of
the actual standard.

-- 
Keith Thompson (The_Other_Keith)  XXXX@XXXXX.COM   < http://www.**--****.com/ ~kst>
San Diego Supercomputer Center             <*>  < http://www.**--****.com/ ~kst>
We must do something.  This is something.  Therefore, we must do this.

Re: Draft standards OK for new compiler and libc?

Postby James Buchanan » Mon, 24 Oct 2005 04:25:36 GMT


 

$18, hmm. Not too bad, but still pricey (in my currency).  I was looking at
the IEEE standards online store and the download cost of POSIX was more
than $200, perhaps $260 or something.  Now that is insane.  I just assumed
all standards were outrageously expensive!  I don't think there's anything
of interest in POSIX though if implementing an ISO C compliant compiler and
library.

-- 
James Buchanan

Re: Draft standards OK for new compiler and libc?

Postby Niklas Matthies » Mon, 24 Oct 2005 04:45:15 GMT



One counter-example: The possibility that an integer conversion to a
signed integer type that cannot represent the value to be converted
raises an implementation-defined signal instead of resulting in an
implementation-defined value was added after the final public draft.

-- Niklas Matthies

Re: Draft standards OK for new compiler and libc?

Postby des » Mon, 24 Oct 2005 04:45:40 GMT

James Buchanan < XXXX@XXXXX.COM > writes:

The Open Group makes POSIX (aka SUSv3) available for free online.

DES
-- 
Dag-Erling Smgrav -  XXXX@XXXXX.COM 

Re: Draft standards OK for new compiler and libc?

Postby Keith Thompson » Mon, 24 Oct 2005 05:29:11 GMT

Niklas Matthies < XXXX@XXXXX.COM > writes:



That's a good example, and it's certainly something you're better off
knowing than not knowing.

Interestingly, that knowledge isn't strictly necessary if you're
implementing a C compiler; it just wouldn't take advantage of the new
permission to raise a signal.

-- 
Keith Thompson (The_Other_Keith)  XXXX@XXXXX.COM   < http://www.**--****.com/ ~kst>
San Diego Supercomputer Center             <*>  < http://www.**--****.com/ ~kst>
We must do something.  This is something.  Therefore, we must do this.

Re: Draft standards OK for new compiler and libc?

Postby Chris Hills » Tue, 25 Oct 2005 05:16:21 GMT

In article <435a7216$0$28054$5a62ac22@per-qv1-newsreader-
01.iinet.net.au>, James Buchanan < XXXX@XXXXX.COM > writes

Hardly.  The fact that you are even considering it shows you are not
serious. You need the current standard + the TC's as well. Otherwise you
may just as well go and base it on K&R 2nd edition.


Possibly.

-- 
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
/\/\/  XXXX@XXXXX.COM       www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/




Re: Draft standards OK for new compiler and libc?

Postby Chris Hills » Tue, 25 Oct 2005 05:19:17 GMT

In article <435a906d$0$28022$5a62ac22@per-qv1-newsreader-
01.iinet.net.au>, James Buchanan < XXXX@XXXXX.COM > writes



What currency?  FOr a standard that is quite inexpensive.


Why? Others cost far more than that.


It depends if you need to be POSIX complient. What target is your
compiler for?

-- 
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
/\/\/  XXXX@XXXXX.COM       www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/




Re: Draft standards OK for new compiler and libc?

Postby Antoine Leca » Tue, 25 Oct 2005 18:37:39 GMT



In fact, a serious implementer should have at least skimmed the Rationale
and all the DRs. Also, of course. There are a lot of hints for the
implementers there.


Antoine


Re: Draft standards OK for new compiler and libc?

Postby Chris Hills » Tue, 25 Oct 2005 22:10:41 GMT

In article <435cab6b$0$21281$ XXXX@XXXXX.COM >, Antoine Leca
< XXXX@XXXXX.COM > writes



I agree totally.

Whilst I don't expect many programmer to have the standards, and most
don't, because they have to work to the compiler and it's documents
primarily. 

The implimentors have to know the standard to know where they are
deviating from the standard, and why, so they can document this in the
compiler manuals. 



-- 
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
/\/\/  XXXX@XXXXX.COM       www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/




Re: Draft standards OK for new compiler and libc?

Postby those who know me have no need of my name » Fri, 28 Oct 2005 15:19:42 GMT

in comp.std.c i read:




iso's price is much higher.  ansi's is the exception, for this particular
standard in pdf format at least.

-- 
a signature

Re: Draft standards OK for new compiler and libc?

Postby Francis Glassborow » Fri, 28 Oct 2005 19:49:40 GMT

In article < XXXX@XXXXX.COM >, those who know me have no need of 
my name < XXXX@XXXXX.COM > writes


And the version published in book form (The C Standard, 0-470-84573-2) 
is also much cheaper than buying direct from ISO. The cover cost is $65 
but you can get it somewhat cheaper.


-- 
Francis Glassborow      ACCU
Author of 'You Can Do It!' see  http://www.**--****.com/ 
For project ideas and contributions:  http://www.**--****.com/ 

Re: Draft standards OK for new compiler and libc?

Postby Mabden » Fri, 28 Oct 2005 20:42:22 GMT




of

compiler
particular
$65

And what does a Latin Dictionary go for?

As if people are really going to spend money on Dead Languages...

I have my K&R from when that was C. So far, there has been one
difference - they moved NULL. Otherwise, It's been a good 15 years. And
you know what, I never really cared about where NULL was, so much. Oy!

-- 
Mabden



Re: Draft standards OK for new compiler and libc?

Postby richard » Fri, 28 Oct 2005 20:52:49 GMT

In article <y238f.20612$ XXXX@XXXXX.COM >,



About 10 pounds for a good one, but you might consider second-hand.

-- Richard

Re: Draft standards OK for new compiler and libc?

Postby Mabden » Sat, 29 Oct 2005 14:29:09 GMT






No, my first hand weighs about 10 pounds. Depends on where you cut it
off...

-- 
Mabden



Similar Threads:

1.(new) ANY LENGTH in draft Standard

2.non-standard functions in libc -- bad design?

I've been involved, in another context, in a long and contentious
discussion about whether functions that are part of the POSIX
standard but not the C standard -- getpid() in particular --
should be regarded as "third-party".  One of my arguments against
so regarding them is that gcc packages them in libc along with
C-standard functions such as printf().  The other side responded
by saying that this just shows how "broken" UNIX is -- that libc
should include only functions that are part of the C standard.
Both sides in this debate, however, seem to have their biases :-),
so I thought I'd try to get a wider range of opinions .... :

(*) Is "third-party" an accurate term to apply to functions that
are not part of the C standard (but might be part of some other
standard supported by a compiler/library, such as POSIX)?

(*) Is there a compelling reason to avoid including anything
that's not part of the C standard library in libc (and instead
put it in a separate library)?  If there is, does anyone know
why gcc doesn't do it that way?

I *think* this is mostly on-topic, despite the references to POSIX
and gcc, since the point is mostly to explore the definition of
"third-party" and the packaging of non-standard library functions.

-- 
B. L. Massingill
ObDisclaimer:  I don't speak for my employers; they return the favor.

3.C89 standard rationale or draft, where to download?

Hi, all,
  Is it possible to find C89 standard rationale or draft version
on the Internet?(NOT the C99 version). Any urls?
  Thank you in advance.

Best regards,
acthom

4.Draft version of the standard (was: Questions about pointers to objects and pointers to functions)

5.older standard drafts for download?

Is there a place I can download the last public draft for C89? What 
about a draft for C95?

What I really need is a list of all standard library functions, macros, 
types, etc. for a "keyword file", which is used for syntax highlighting. 
I want to create one for both major C standards, with the C89/90 version 
including the 1995 amendment. I already have n869 for C99.

Thanks.

-Kevin
-- 
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

6. Is the (draft) 2008 standard available ?

7. Latest working draft of next COBOL Standard

8. Draft of Rivision for next COBOL Standard



Return to std c

 

Who is online

Users browsing this forum: No registered users and 14 guest