This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80460] Incorrect fallthrough warning after [[noreturn]] function inside always-true conditional
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 19 Apr 2017 10:27:58 +0000
- Subject: [Bug c++/80460] Incorrect fallthrough warning after [[noreturn]] function inside always-true conditional
- Auto-submitted: auto-generated
- References: <bug-80460-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80460
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I thought we could (in collect_fallthrough_labels) look at the GIMPLE_COND, see
if its OP0 and OP1 are INTEGER_CSTs, and if they are, determine which branch
cannot be taken, and then maybe don't do
labels->safe_push (l);
which should suppress the warning.