GNU bug report logs - #75964
Switching the Emacs build to -Wswitch-enum in src/

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> protonmail.com>

Date: Fri, 31 Jan 2025 09:41:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>, Eli Zaretskii <eliz <at> gnu.org>
Cc: pipcet <at> protonmail.com, 75964 <at> debbugs.gnu.org
Subject: bug#75964: Switching the Emacs build to -Wswitch-enum in src/
Date: Wed, 5 Feb 2025 14:20:12 -0800
Paul Eggert <eggert <at> cs.ucla.edu> writes:

>> I very much doubt these techniques will make our situation
>> significantly better, if at all.
>
> Admittedly Emacs has more serious bugs than enum mismatches. However,
> checking these mismatches can help find mistakes or help clarify code.

We had Bug#75712, for example, which I believe Pip Cet found by enabling
-Wswitch-enum.  It would be nice to catch such bugs statically.




This bug report was last modified 127 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.