Sujet : Re: Suggested method for returning a string from a C program?
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 23. Mar 2025, 00:46:28
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <865xk0ljcb.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Tim Rentsch <
tr.17687@z991.linuxsc.com> writes:
Richard Heathfield <rjh@cpax.org.uk> writes:
>
On 20/03/2025 13:06, Tim Rentsch wrote:
[...]
The C99 standard has a list of 54 what it calls "major changes",
although IMO many or most of those are fairly minor. There are
also other differences relative to C90, but most of them are
simply clarifications or slight changes in wording.
>
Those I largely recall from discussions at the time, but I dare
to conclude that your lack of a reference to C11, C17, and C23
means that they had a lesser effect on the language than I'd
feared.
>
[...]
>
As it turn out, the C11 standard lists only 15 "major changes" (if
my quick counting is correct), so your conclusion that later
versions have had a lesser effect appears to be correct, at least as
far as C11 goes. If I have time I may post again on this topic,
doing for the C11 standard what I did for the C99 standard.
Here is my summary of the corresponding list in the C11 standard
(descriptive headings reprepresent my own views on each area):
Changes every user of C11 will or should want to know about (they
may choose not to use any particular items, but every one is
important to at least know about)
REMOVED: the gets() library function
SUPPORT MADE CONDITIONAL: complex numbers, VLAs and VMTs
unicode characters and strings
a new form of expression, _Generic, for type-generic expressions
anonymous structures and unions (which are members of an
enclosing struct or union that do not themselves have a
member name)
static assertions
[but there are well-known techniques for providing SA in C90/C99]
no-return functions (guaranteed not to return to their caller)
support for opening files for exclusive access
Significant new functionality that some but not all people care about
support for multiple threads of execution
querying and specifying object alignment (also aligned_alloc library
function)
facilities for "fast path" program exit (quick_exit, at_quick_exit)
Minor additions probably of interest to relatively few people
macros defining additional characteristics of floating point (in
float.h)
macros to create complex numbers
Conditionally supported Annexes - perhaps important to some, but
mostly not essential
bounds-checking variants of several standard library functions
language functionality extensions meant to help with analyzability
of source code