This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]