Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #161631 > unrolled thread
| Started by | Rayshawn Levy <rayshawnlevy3@gmail.com> |
|---|---|
| First post | 2021-07-03 17:42 -0700 |
| Last post | 2021-07-16 21:35 +0100 |
| Articles | 13 — 8 participants |
Back to article view | Back to comp.lang.c
Difference between C89 and other C standards Rayshawn Levy <rayshawnlevy3@gmail.com> - 2021-07-03 17:42 -0700
Re: Difference between C89 and other C standards Richard Damon <Richard@Damon-Family.org> - 2021-07-03 21:29 -0400
Re: Difference between C89 and other C standards James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-07-03 22:45 -0400
Re: Difference between C89 and other C standards Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-07-03 22:03 -0700
Re: Difference between C89 and other C standards Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-07-11 03:00 -0700
Re: Difference between C89 and other C standards Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-07-11 15:34 -0700
Re: Difference between C89 and other C standards Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-07-16 03:35 -0700
Re: Difference between C89 and other C standards Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> - 2021-07-11 13:24 +0200
Re: Difference between C89 and other C standards Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-07-11 15:34 -0700
Re: Difference between C89 and other C standards Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> - 2021-07-12 05:33 +0200
Re: Difference between C89 and other C standards David Brown <david.brown@hesbynett.no> - 2021-07-12 09:49 +0200
Re: Difference between C89 and other C standards Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-07-12 01:13 -0700
Re: Difference between C89 and other C standards Vir Campestris <vir.campestris@invalid.invalid> - 2021-07-16 21:35 +0100
| From | Rayshawn Levy <rayshawnlevy3@gmail.com> |
|---|---|
| Date | 2021-07-03 17:42 -0700 |
| Subject | Difference between C89 and other C standards |
| Message-ID | <45bddc19-f745-4c9e-b395-8a6b2dd39f5an@googlegroups.com> |
I'm trying to figure out the differences between C89 and the other C standards. What are the valid types, macros, directives, syntax, etc. in C89 (I can't seem to find the answer to this anywhere) compared to the other standards and there seems to be a shortage of proper C89 tutorials on the web. Can anyone help? By the way I'm new to the group so, nice to meet you all!
[toc] | [next] | [standalone]
| From | Richard Damon <Richard@Damon-Family.org> |
|---|---|
| Date | 2021-07-03 21:29 -0400 |
| Message-ID | <3a8EI.113860$ytM9.67384@fx35.iad> |
| In reply to | #161631 |
On 7/3/21 8:42 PM, Rayshawn Levy wrote: > I'm trying to figure out the differences between C89 and the other C standards. > What are the valid types, macros, directives, syntax, etc. in C89 (I can't seem to find the answer to this anywhere) compared to the other standards and there seems to be a shortage of proper C89 tutorials on the web. Can anyone help? By the way I'm new to the group so, nice to meet you all! > Wikipedia has an article on C99, the next version of the langague which has a section on the changes: https://en.wikipedia.org/wiki/C99 Not sure why you want to know what this sort of detail about C89 (or C90 as it is more commonly called after the ISO version). I don't know of any environments still in use that are restricted to just a pure C90 usage.
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@alumni.caltech.edu> |
|---|---|
| Date | 2021-07-03 22:45 -0400 |
| Message-ID | <sbr7cr$3b2$1@dont-email.me> |
| In reply to | #161631 |
On 7/3/21 8:42 PM, Rayshawn Levy wrote: > I'm trying to figure out the differences between C89 and the other C standards. > What are the valid types, macros, directives, syntax, etc. in C89 (I can't seem to find the answer to this anywhere) compared to the other standards and there seems to be a shortage of proper C89 tutorials on the web. Can anyone help? By the way I'm new to the group so, nice to meet you all! C90 differed from C89 almost exclusively by the addition of three sections at the beginning that were required by ISO. As a result, all section numbers in C89 were increased by 3 in C90. Each version of the C standard after C89 contains a forward that summarizes the differences. The changes made in C99: > — restricted character set support via digraphs and <iso646.h> (originally specified > in AMD1) > — wide character library support in <wchar.h> and <wctype.h> (originally > specified in AMD1) > — more precise aliasing rules via effective type > — restricted pointers > — variable length arrays > — flexible array members > — static and type qualifiers in parameter array declarators > — complex (and imaginary) support in <complex.h> > — type-generic math macros in <tgmath.h> > — the long long int type and library functions > — increased minimum translation limits > — additional floating-point characteristics in <float.h> > — remove implicit int > — reliable integer division > — universal character names (\u and \U) > — extended identifiers > — hexadecimal floating-point constants and %a and %A printf/scanf conversion > specifiers > — compound literals > — designated initializers > — // comments > — extended integer types and library functions in <inttypes.h> and <stdint.h> > — remove implicit function declaration > — preprocessor arithmetic done in intmax_t/uintmax_t > — mixed declarations and code > — new block scopes for selection and iteration statements > — integer constant type rules > — integer promotion rules > — macros with a variable number of arguments > — the vscanf family of functions in <stdio.h> and <wchar.h> > — additional math library functions in <math.h> > — treatment of error conditions by math library functions (math_errhandling) > — floating-point environment access in <fenv.h> > — IEC 60559 (also known as IEC 559 or IEEE arithmetic) support > — trailing comma allowed in enum declaration > — %lf conversion specifier allowed in printf > — inline functions > — the snprintf family of functions in <stdio.h> > — boolean type in <stdbool.h> > — idempotent type qualifiers > — empty macro arguments > — new structure type compatibility rules (tag compatibility) > — additional predefined macro names > — _Pragma preprocessing operator > — standard pragmas > — _ _func_ _ predefined identifier > — va_copy macro > — additional strftime conversion specifiers > — LIA compatibility annex > — deprecate ungetc at the beginning of a binary file > — remove deprecation of aliased array parameters > — conversion of array to pointer not limited to lvalues > — relaxed constraints on aggregate and union initialization > — relaxed restrictions on portable header names > — return without expression not permitted in function that returns a value (and vice > versa) Changes made in C2011: > — conditional (optional) features (including some that were previously mandatory) > — support for multiple threads of execution including an improved memory sequencing > model, atomic objects, and thread-local storage (<stdatomic.h> and > <threads.h>) > — additional floating-point characteristic macros (<float.h>) > — querying and specifying alignment of objects (<stdalign.h>, <stdlib.h>) > — Unicode characters and strings (<uchar.h>) (originally specified in ISO/IEC TR 19769:2004) > — type-generic expressions > — static assertions > — anonymous structures and unions > — no-return functions > — macros to create complex numbers (<complex.h>) > — support for opening files for exclusive access > — removed the gets function (<stdio.h>) > — added the aligned_alloc, at_quick_exit, and quick_exit functions > (<stdlib.h>) > — (conditional) support for bounds-checking interfaces (originally specified in > ISO/IEC TR 24731−1:2007) > — (conditional) support for analyzability You'll have to read both the C89 standard and each of the subsequent standards to understand precisely what all of those short summary statements mean. A fully detailed explanation of those differences would probably be longer than the standard itself. You'd be much better learning the current standards and not bothering with C89. The lack of C89 tutorials is probably due to the fact that there's no good reason to be using C89 rather than C2011. C89 had many problems that have been resolved by the changes made in later versions of the standard.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2021-07-03 22:03 -0700 |
| Message-ID | <87o8bi8ycb.fsf@nosuchdomain.example.com> |
| In reply to | #161631 |
Rayshawn Levy <rayshawnlevy3@gmail.com> writes:
> I'm trying to figure out the differences between C89 and the other C standards.
> What are the valid types, macros, directives, syntax, etc. in C89 (I
> can't seem to find the answer to this anywhere) compared to the other
> standards and there seems to be a shortage of proper C89 tutorials on
> the web. Can anyone help? By the way I'm new to the group so, nice to
> meet you all!
C89 and C90 are the same language, described by different editions
of the standard (ANSI and ISO, respectively). The documents differ
by the insertion of some additional sections, so C89 section 3 is
C90 section 6.
C99 and C11 are newer editions. There's also a C17, and work is in
progress on a newer version.
Each edition includes a foreword that describes the differences from the
previous edition.
The standard itself costs money, but N1256 is the C99 standard with
three Technical Corrigenda merged into it, and N1570 is a draft of the
C11 standard that's very close to the published standard.
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Date | 2021-07-11 03:00 -0700 |
| Message-ID | <86o8b96uge.fsf@linuxsc.com> |
| In reply to | #161636 |
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes: > Rayshawn Levy <rayshawnlevy3@gmail.com> writes: > >> I'm trying to figure out the differences between C89 and the other >> C standards. What are the valid types, macros, directives, syntax, >> etc. in C89 (I can't seem to find the answer to this anywhere) >> compared to the other standards and there seems to be a shortage of >> proper C89 tutorials on the web. Can anyone help? By the way I'm >> new to the group so, nice to meet you all! > > C89 and C90 are the same language, [...] They are almost but not quite the same language. There are a few minor differences that I ran across accidentally some time ago while looking at the two sort of side-by-side. I don't remember what any of the differences are, except that they were minor changes (such as adding a few words to an existing sentence). I think for practical purposes C89 and C90 can be considered to be the same language in almost all cases. I just wanted to report the existence of a few changes between the two standards. Note that what I'm reporting are differences in the literal texts in the two cases, not necessarily differences in intent for what the texts are meant to express.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2021-07-11 15:34 -0700 |
| Message-ID | <87eec45vk7.fsf@nosuchdomain.example.com> |
| In reply to | #161873 |
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> Rayshawn Levy <rayshawnlevy3@gmail.com> writes:
>>> I'm trying to figure out the differences between C89 and the other
>>> C standards. What are the valid types, macros, directives, syntax,
>>> etc. in C89 (I can't seem to find the answer to this anywhere)
>>> compared to the other standards and there seems to be a shortage of
>>> proper C89 tutorials on the web. Can anyone help? By the way I'm
>>> new to the group so, nice to meet you all!
>>
>> C89 and C90 are the same language, [...]
>
> They are almost but not quite the same language. There are a few
> minor differences that I ran across accidentally some time ago
> while looking at the two sort of side-by-side. I don't remember
> what any of the differences are, except that they were minor
> changes (such as adding a few words to an existing sentence).
>
> I think for practical purposes C89 and C90 can be considered to
> be the same language in almost all cases. I just wanted to
> report the existence of a few changes between the two standards.
>
> Note that what I'm reporting are differences in the literal texts
> in the two cases, not necessarily differences in intent for what
> the texts are meant to express.
Any chance you could be more specific?
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Date | 2021-07-16 03:35 -0700 |
| Message-ID | <86czri7dha.fsf@linuxsc.com> |
| In reply to | #161881 |
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes: > Tim Rentsch <tr.17687@z991.linuxsc.com> writes: > >> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes: >> >>> Rayshawn Levy <rayshawnlevy3@gmail.com> writes: >>> >>>> I'm trying to figure out the differences between C89 and the other >>>> C standards. What are the valid types, macros, directives, syntax, >>>> etc. in C89 (I can't seem to find the answer to this anywhere) >>>> compared to the other standards and there seems to be a shortage of >>>> proper C89 tutorials on the web. Can anyone help? By the way I'm >>>> new to the group so, nice to meet you all! >>> >>> C89 and C90 are the same language, [...] >> >> They are almost but not quite the same language. There are a few >> minor differences that I ran across accidentally some time ago >> while looking at the two sort of side-by-side. I don't remember >> what any of the differences are, except that they were minor >> changes (such as adding a few words to an existing sentence). >> >> I think for practical purposes C89 and C90 can be considered to >> be the same language in almost all cases. I just wanted to >> report the existence of a few changes between the two standards. >> >> Note that what I'm reporting are differences in the literal texts >> in the two cases, not necessarily differences in intent for what >> the texts are meant to express. > > Any chance you could be more specific? Sorry, I don't remember anything else beyond what I described above.
[toc] | [prev] | [next] | [standalone]
| From | Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> |
|---|---|
| Date | 2021-07-11 13:24 +0200 |
| Message-ID | <scekdv$1f7j$1@gioia.aioe.org> |
| In reply to | #161631 |
Am 04.07.2021 um 02:42 schrieb Rayshawn Levy: > I'm trying to figure out the differences between C89 and the other C standards. > What are the valid types, macros, directives, syntax, etc. in C89 (I can't seem to find the answer to this anywhere) compared to the other standards and there seems to be a shortage of proper C89 tutorials on the web. Can anyone help? By the way I'm new to the group so, nice to meet you all! There's no differnce. The newer versions are just bufixed specs.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2021-07-11 15:34 -0700 |
| Message-ID | <87im1g5vkw.fsf@nosuchdomain.example.com> |
| In reply to | #161874 |
Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> writes:
> Am 04.07.2021 um 02:42 schrieb Rayshawn Levy:
>> I'm trying to figure out the differences between C89 and the other C standards.
>> What are the valid types, macros, directives, syntax, etc. in C89 (I
>> can't seem to find the answer to this anywhere) compared to the
>> other standards and there seems to be a shortage of proper C89
>> tutorials on the web. Can anyone help? By the way I'm new to the
>> group so, nice to meet you all!
>
> There's no differnce. The newer versions are just bufixed specs.
If you're saying there are no differences between C89 and C99,
C11, et al, then you are lying. (I say this based on some of your
previous posts.)
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */
[toc] | [prev] | [next] | [standalone]
| From | Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> |
|---|---|
| Date | 2021-07-12 05:33 +0200 |
| Message-ID | <scgd6c$h4q$1@gioia.aioe.org> |
| In reply to | #161880 |
Am 12.07.2021 um 00:34 schrieb Keith Thompson: > Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> writes: >> Am 04.07.2021 um 02:42 schrieb Rayshawn Levy: >>> I'm trying to figure out the differences between C89 and the other C standards. >>> What are the valid types, macros, directives, syntax, etc. in C89 (I >>> can't seem to find the answer to this anywhere) compared to the >>> other standards and there seems to be a shortage of proper C89 >>> tutorials on the web. Can anyone help? By the way I'm new to the >>> group so, nice to meet you all! >> >> There's no differnce. The newer versions are just bufixed specs. > > If you're saying there are no differences between C89 and C99, > C11, et al, then you are lying. (I say this based on some of your > previous posts.) No, I'm not lying. The newer versions are just bugfixes.
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2021-07-12 09:49 +0200 |
| Message-ID | <scgs75$mh1$1@dont-email.me> |
| In reply to | #161880 |
On 12/07/2021 00:34, Keith Thompson wrote: > Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> writes: >> Am 04.07.2021 um 02:42 schrieb Rayshawn Levy: >>> I'm trying to figure out the differences between C89 and the other C standards. >>> What are the valid types, macros, directives, syntax, etc. in C89 (I >>> can't seem to find the answer to this anywhere) compared to the >>> other standards and there seems to be a shortage of proper C89 >>> tutorials on the web. Can anyone help? By the way I'm new to the >>> group so, nice to meet you all! >> >> There's no differnce. The newer versions are just bufixed specs. > > If you're saying there are no differences between C89 and C99, > C11, et al, then you are lying. (I say this based on some of your > previous posts.) > He is trolling you Keith, I think. He is specifically avoiding giving the versions to which he is referring. In case he is just ignorant, here is an approximate summary: From C89 to C90, the changes are just formality in the text (unless Tim knows something we don't. We can expect him to reply patronisingly in a few months to your request for details, and maybe if you humour his ego he'll point to the insignificant word changes some time next year). From C90 to C99 there were /massive/ changes. From C99 to C11 there were some major additions, but they make relatively little difference to a lot of C programming. From C11 to C17 there were only technical revisions and corrections (and nicer typography) - "bug fixes". C23 (that appears to be the planned date) will have a few improvements, including standardisation of some existing common extensions and some imported C++ features. Details are still to be determined, of course. The standards themselves all have a summary of the changes, which is handy. There is a history of C at <https://en.cppreference.com/w/c/language/history>.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2021-07-12 01:13 -0700 |
| Message-ID | <87a6ms54qh.fsf@nosuchdomain.example.com> |
| In reply to | #161884 |
David Brown <david.brown@hesbynett.no> writes:
> On 12/07/2021 00:34, Keith Thompson wrote:
>> Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> writes:
[...]
>>> There's no differnce. The newer versions are just bufixed specs.
>>
>> If you're saying there are no differences between C89 and C99,
>> C11, et al, then you are lying. (I say this based on some of your
>> previous posts.)
>
> He is trolling you Keith, I think. He is specifically avoiding giving
> the versions to which he is referring.
Of course he (or she) is trolling. He's demonstrated enough
knowledge of C in his previous posts that it cannot be
from ignorance. You may recall that he recently claimed that
there's a possible race condition in a simple program that calls
printf followed by exit(0), and doubled down when challenged.
In comp.lang.c++, he made some absurd claims about Unicode support
in gcc v1.01.
I am mildly concerned that some readers might take him seriously,
which is why I have not yet killfiled him, though I dislike giving
him the attention he obviously craves.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */
[toc] | [prev] | [next] | [standalone]
| From | Vir Campestris <vir.campestris@invalid.invalid> |
|---|---|
| Date | 2021-07-16 21:35 +0100 |
| Message-ID | <scsqhn$dvs$1@dont-email.me> |
| In reply to | #161884 |
On 12/07/2021 08:49, David Brown wrote: > He is trolling you Keith, I think. He is specifically avoiding giving > the versions to which he is referring. > > In case he is just ignorant, here is an approximate summary: > > From C89 to C90, the changes are just formality in the text (unless Tim > knows something we don't. We can expect him to reply patronisingly in a > few months to your request for details, and maybe if you humour his ego > he'll point to the insignificant word changes some time next year). > > From C90 to C99 there were/massive/ changes. > > From C99 to C11 there were some major additions, but they make > relatively little difference to a lot of C programming. > > From C11 to C17 there were only technical revisions and corrections (and > nicer typography) - "bug fixes". > > C23 (that appears to be the planned date) will have a few improvements, > including standardisation of some existing common extensions and some > imported C++ features. Details are still to be determined, of course. > > > The standards themselves all have a summary of the changes, which is > handy. There is a history of C at > <https://en.cppreference.com/w/c/language/history>. > As an old K&R programmer mostly using C++ that's pretty depressing. And yet there are substantial quantities of C in our codebase, and having looked through the list I seem to have picked most of it up! Andy
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.c
csiph-web