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


Message #182 received at 75964 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: acorallo <at> gnu.org, pipcet <at> protonmail.com, eggert <at> cs.ucla.edu,
 75964 <at> debbugs.gnu.org, stefankangas <at> gmail.com
Subject: Re: bug#75964: Switching the Emacs build to -Wswitch-enum in src/
Date: Tue, 04 Feb 2025 16:57:34 +0200
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  eggert <at> cs.ucla.edu,
>   75964 <at> debbugs.gnu.org,  stefankangas <at> gmail.com,  Andrea Corallo
>  <acorallo <at> gnu.org>
> Date: Tue, 04 Feb 2025 08:58:21 -0500
> 
> > Switching over an enum without a default: label will generate
> > fall-through code, for those cases in which the enum variable has a
> > value that's not in the enumeration.
> 
> Ah, thanks, now I understand the problem.
> 
> Yes, this part of C sucks and I had forgotten about it.

What sucks and why?




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.