Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Suggested method for returning a string from a C program? Date: Sat, 22 Mar 2025 16:46:28 -0700 Organization: A noiseless patient Spider Lines: 77 Message-ID: <865xk0ljcb.fsf@linuxsc.com> References: <87a59hvgyk.fsf@nosuchdomain.example.com> <86ecyronqa.fsf@linuxsc.com> <86a59fo910.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sun, 23 Mar 2025 00:46:34 +0100 (CET) Injection-Info: dont-email.me; posting-host="9d1f1f7cc6a206205b2fa56df000aacf"; logging-data="1048488"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mi460exRV2EUYZOvJ82INT6JVZNFy8lI=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:THvZ61lvPon/oyKeuZmsXzrhmXo= sha1:ju+FWSYDyuGkmS3D5d/mDaPG9fo= Xref: csiph.com comp.lang.c:391530 Tim Rentsch writes: > Richard Heathfield 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