public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/91432] gcc -Wimplicit-fallthrough does not warn when fallthrough to break;
Date: Tue, 27 Jul 2021 20:34:52 +0000	[thread overview]
Message-ID: <bug-91432-4-TmDtV56w6z@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-91432-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91432

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Nick Desaulniers from comment #5)
> > Not warning in this case is a very intentional part of those design decisions.
> 
> Can you provide a link to the discussion about this specific case?

The discussions are on gcc-patches mailing list, look into archives from July
2016 to August or September, initially with -Wswitch-fallthrough in the
subject, later -Wimplicit-fallthrough.

> Is re-evaluating the decision out of the question?

Yes.  It is pointless to start warning about code that obviously can't do any
harm, it will only alienate users that will need to mark up more code.
The work Marek has done on this warning started with getting through warnings
on gcc itself and on other projects and has been fine tuned on where it is
essential not to warn and where false positives can be acceptable.

  parent reply	other threads:[~2021-07-27 20:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-91432-4@http.gcc.gnu.org/bugzilla/>
2020-06-04 17:45 ` ndesaulniers at google dot com
2021-07-22 18:25 ` jakub at gcc dot gnu.org
2021-07-27 20:20 ` ndesaulniers at google dot com
2021-07-27 20:34 ` jakub at gcc dot gnu.org [this message]
2021-07-27 22:28 ` joe at perches dot com
2021-07-27 22:32 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-91432-4-TmDtV56w6z@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).