Subject: Re: Switching the Emacs build to -Wswitch-enum in src/

From: Paul Eggert <[email-masked]>
Date: Sun, 2 Feb 2025 00:31:47 -0800

On 2025-02-02 00:21, Pip Cet wrote:

> emacs_abort () isn't equivalent to eassert (false), and that's
> always been confusing to me.

The inspiration is emacs_abort : abort :: eassert : assert. If we made 
emacs_abort () equivalent to eassert (false) we'd break that, as in C 
abort () is not equivalent to assert (false).

> can't we just enable
> -Wswitch-enum and people live with what they get?

Yes, if the new -Wswitch-enum behavior is in stable GCC and if Emacs 
compiles cleanly with the new GCC. Come to think of it, that'd be better 
than autoconfery.

In other words, I'm thinking that the change to Emacs can wait until GCC 
is fixed, and once that happens we can change Emacs. We shouldn't need 
to fiddle with configure.ac or with Makefiles or whatever, other than to 
add -Wswitch-enum.