zsh-workers
 help / color / mirror / code / Atom feed
From: Clinton Bunch <cdb_zsh@zentaur.org>
To: zsh-workers@zsh.org
Subject: Re: ANSI C standard of zsh
Date: Thu, 28 Mar 2024 07:29:43 -0500	[thread overview]
Message-ID: <9693ce55-9bb7-4fdf-ba62-467a729f5367@zentaur.org> (raw)
In-Reply-To: <63074C4C-7ADB-4089-AAE5-7E5533595C41@kba.biglobe.ne.jp>

On 3/28/2024 04:16, Jun T wrote:
>> 2024/03/27 8:16、Clinton Bunch <cdb_zsh@zentaur.org>のメール:
>>
>> If we're going to say Zsh expects C99 we should probably update
>> autoconf to check for C99 (and set any options needed)
>>
>> I've attached a patch for the trivial change needed.
> in the attached patch:
>> -AC_PROG_CC
>> +AC_PROG_CC_C99
> We can use AC_PROG_CC_C99 with autoconf-2.69, but in 2.7x
> it became obsolete and we need to use AC_PROG_CC, which
> tries C11, C99 and C89 (in this order) to find the latest
> edition the compiler supports.
>
> So we first need to decide which version of autoconf we
> use. Maybe we will continue using 2.69 for the moment?

EL 8 and 9 still ship 2.69, as does Solaris 11

FreeBSD 13.2-RELEASE-p10 has 2.71

The development guide currently says 2.50 or later.

2.71 is copyright 2021. 2.69 is 2012.

I believe in updating versions when they become too limiting, but 3 
years isn't what I'd consider limiting.  I don't think we should change 
to assume 2.71 yet.


Do we need to know that the compiler supports C11 unless we're using C11 
features?


>
>
> The following is info for someone who wants to know
> what AC_PROG_CC_C99 will check.
> In the comment to the AC_PROG_CC_C99 macro in c.m4
> (may be in /usr/share/autoconf/autoconf/ if you have 2.69
> installed, or lib/autoconf/ in the autoconf source tree):
>
> # It (AC_PROG_CC_C99) considers the compiler to be in ISO C99
> # mode if it handles
> # _Bool,
> # // comments,
> # flexible array members,          # aka incomplete array
> # inline,
> # long long int,
> # mixed code and declarations,
> # named initialization of structs, # aka designated initializer
> # restrict,
> # va_copy,                  # with <stdarg.h> and va_start etc.
> # varargs macros,        # macros with variable number of args
> # variable declarations in for loops      # for(int i=0; ...)
> # variable length arrays
>
> Note that "variable length array" (optional in C11) is
> required.
The current development guide specifically mentions support for variable 
length arrays.
>
> AC_PROG_CC_C99 does not check, for example (not comprehensive):
> headers other than <stdarg.h>, i.e., <complex.h>, <stdbool.h>,
>     <tgmath.h>, <intypes.h>, etc.
> snprintf() (and any other new library functions)
> universal character name: \uNNNN, \UNNNNNNNN
> compound literal
>



  reply	other threads:[~2024-03-28 12:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 21:44 Clinton Bunch
2024-03-13  1:50 ` Clinton Bunch
2024-03-13  4:16 ` Bart Schaefer
2024-03-13  4:22 ` Bart Schaefer
2024-03-13 16:49   ` Oliver Kiddle
2024-03-23 21:26     ` Clinton Bunch
2024-03-25 23:47       ` Oliver Kiddle
2024-03-26  0:32         ` Clinton Bunch
2024-03-26 23:16           ` Clinton Bunch
2024-03-28  9:16             ` Jun T
2024-03-28 12:29               ` Clinton Bunch [this message]
2024-04-04  0:00                 ` Vincent Lefevre
2024-04-04 22:57                   ` Clinton Bunch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9693ce55-9bb7-4fdf-ba62-467a729f5367@zentaur.org \
    --to=cdb_zsh@zentaur.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).