Re: Discussion about why GNU/Linux system upgrades cause old programs to break
Eli Zaretskii <[email protected]> Thu, 13 Aug 2026 08:17:15 +0300
| Newsgroups | gmane.emacs.devel |
|---|---|
| Message-ID | <[email protected]> |
> From: Arsen Arsenović <[email protected]> > Cc: [email protected], [email protected] > Date: Wed, 12 Aug 2026 20:34:59 +0200 > > > Does Emacs 27 specify an option that implies "reject K&R syntax" > > or "complain about anything that doesn't satisfy the C99 spec?" > > Yes, it will specifically pass -std=gnu11 to a C89 compiler: > > /tmp/emacs-27.1$ ./configure CC='gcc -std=gnu89' --with-jpeg=no --with-gif=no > [...] > What compiler should emacs be built with? gcc -std=gnu89 -std=gnu11 -g3 -O2 > [...] Correction: the -std=gnu11 option will be passed to the compiler only if needed and supported. Emacs (starting from v25.1) requires C99, it does not require C11. > > Does GCC offer an option to allow K&R function definitions along with > > the features of C99, which could have been used in compiling Emacs 27? > > Yes, though Emacs 27 doesn't need it, by passing -std=c89. > > But, gcc allows you to recover the old behavior (of permitting cetain > K&R constructs in C99 and onwards) also, by passing: > > -Wno-error=implicit-function-declaration > -Wno-error=declaration-missing-parameter-type > -Wno-error=return-mismatch > -Wno-error=int-conversion > -Wno-error=incompatible-pointer-types Sadly, the GCC manual, even the latest one which ships with GCC 16.2, does not have an index entry that matches "K&R", so users who want to know how to disable the warnings and errors when compiling such programs have an uphill battle to fight to discover these options. > Emacs 27 builds fine actually. > > The error that was originally being discussed was not a break in the > toolchain, just a system administration error. The problem with SIGSTKSZ, which breaks the original Emacs 27.1 sources, is not a system administration error. But yes, Emacs 27 doesn't have problems with K&R syntax, that was a misunderstanding.