Re: Discussion about why GNU/Linux system upgrades cause old programs to break

Arsen Arsenović <[email protected]>
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
Eli Zaretskii <[email protected]> writes:

>> 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.

That doesn't contradict what I said.

>> > 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.

Indeed, it may be worth writing a little bit about that and linking to
the flag under (gcc) Standards, and then indexing the paragraph about
K&R C as such.

>> 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.

-- 
Arsen Arsenović
signature.asc (application/pgp-signature, 418 B)
-----BEGIN PGP SIGNATURE-----

iQECBAEWCgCqFiEE/uKz0RP8AKMWLWBhUsKUMB6ixJMFAmp+QaEbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z
Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRGRUUyQjNEMTEzRkMwMEEzMTYyRDYw
NjE1MkMyOTQzMDFFQTJDNDkzEBxhcnNlbkBhYXJzZW4ubWUACgkQUsKUMB6ixJNZ
iwEAqMd0xIqEuCUQE86z6yfNTVCnSLM/oyt5uPLSjvIWqhwA/jm5t0hM/wUFZAJE
wz718DYq/rREoYjOrsHuTmc+RLsJ
=s9v0
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.