[Bug c++/80460] Incorrect fallthrough warning after [[noreturn]] function inside always-true conditional

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 19 10:28:00 GMT 2017


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.


More information about the Gcc-bugs mailing list