Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ANSI C standard of zsh



c89 will not build 5.9 on Solaris

On FreeBSD

configure with CC=c89 fails
 CC='cc -std=c89' is overridden by configure with -std=gnu11

On 3/12/2024 16:44, Clinton Bunch wrote:

I was looking at the development guide and saw this:

The primary language is ANSI C as defined by the 1989 standard, but the
  code should always be compatible with late K&R era compilers ("The C
  Programming Language" 1st edition, plus "void" and "enum").  There are
  many hacks to avoid the need to actually restrict the code to K&R C --
  check out the configure tests -- but always bear the compatibility
  requirements in mind.  In particular, preprocessing directives must
  have the "#" unindented, and string pasting is not available.

5.9 does not compile with gcc's c89 on EL 8 or 9 (Rocky specifically).
I intend to test FreeBSD and Solaris as well, but haven't yet.

I will point out the C99 standard is now a quarter century old. I propose that we update the development guide to remove the bit about the 1989 standard (much less K&R compatibility) since it is no longer true, and I personally question if it even makes sense as a goal 30+ years in to development.




Messages sorted by: Reverse Date, Date, Thread, Author