Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #161634
| From | James Kuyper <jameskuyper@alumni.caltech.edu> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Difference between C89 and other C standards |
| Date | 2021-07-03 22:45 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <sbr7cr$3b2$1@dont-email.me> (permalink) |
| References | <45bddc19-f745-4c9e-b395-8a6b2dd39f5an@googlegroups.com> |
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.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
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
csiph-web