Jason Curl said:
I've seen the document N869.txt and the copy I could find talks about
C99. Is there anything that comprehensively describes the difference
between C89 and C99? I'd like to write code to be as portable as possible.
Thanks,
Jason.
K&R 1st ed was the original C description from the 1970's
It is now obsolete as regards being the C language specification.
K&R 2nd Ed pub 1988 their book update to C89
C89 is an ANSI standard from dated 1989
C90 is the ISO version and the first International C standard
These three should be the same. K&R were on the ANSI panel that
produced [ANSI] C89 and that became ISO-C90
There have been various Amendments and TC's in 93,4,5 etc
In 1999 there was a new version of the ISO-C standard. C99.
The problem is that despite 2 TC's to C99 there are no conforming
compilers for it. Most are part way between C90 and C99.
If you want to write portable C I would use C99 with A1 and the TC's It
is where (AFAIK) most of the compilers are at. Of course it depends what
you are writing and what sort of portability you want. For portability
there could be far more important issues than sticking to ISO-C
BTW
You should not be using any N*** document as these are committee working
documents and therefore not accurate. They have been superseded by the
published standard and will not include any/some/all changes (if any)
after the reviews.
Buy the standard if you want to work to it. Using an N*** document is
like trying to write a legal document using a dictionary which may have
an arbitrary number of spelling mistakes and incorrect definitions in
it.