autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can Autoconf help with the transition to stricter compilation de


From: Paul Eggert
Subject: Re: How can Autoconf help with the transition to stricter compilation defaults?
Date: Sat, 12 Nov 2022 14:55:08 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 2022-11-12 06:09, Zack Weinberg wrote:

-  and ‘false’ work anyway.  This is for compatibility with C 2023 and
+  and ‘false’ work anyway.  This is for compatibility with C23 and

Why are you changing four-digit years to two-digit years?
Formerly the Autoconf documentation was inconsistent. In the rest of the world people typically write "C89", "C99", "C11", "C17" and "C23" so I went with that even though (as you suggest) it will be problematic after the year 2088, assuming C is still being standardized after that. I'd be happy to change them to "C1989" etc. if preferred. I don't want to use the official names; for example, the official name for C17 is "ISO/IEC 9899:2018" which is far too long, and it doesn't say "C", and it uses the "wrong" year number.


  All other headers, including all headers
  from later revisions of the C standard, need to be tested for
+if your program is intended to be portable to C89
  (@pxref{Header Files}).

I don’t understand what this addition is supposed to mean.  Not all
“modern” systems supply all of the C99 headers, even now.

The intent was that if you don't care about C89 any more (which many people don't), you needn't worry about checking for headers like <stdbool.h> that C99 requires even for freestanding compilers.

Perhaps something like the attached patch?



-The C standard says a call @code{malloc (0)} is implementation
+The C standard says a successful call @code{malloc (0)} is implementation
  dependent.  It can return either @code{NULL} or a new non-null pointer.

Style nit: how can a _call_ be implementation dependent?  Suggest
something like “The C standard says that _the result of_ a successful
call _to_ @code{malloc (0)} is implementation dependent.” (underscores
just to mark additions, not part of suggested text)

That's wordy, and similar wording is repeated elsewhere. How about changing it from "a call malloc (0)" to simply "malloc (0)", and similarly elsewhere? The shorter string is pretty clear in context.

Attachment: autoconf-man.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]