https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80050
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- I thought the same thing. It looks like a deficiency in the implementation. The following is a simple test case for the missing warning. I'm undecided whether to open a separate bug for it or if this bug should track it. $ cat u.c && gcc -S -Wall -Wextra -Wpedantic -Wlogical-op u.c int f (int i) { if (i == 123 && i != 456) return 1; return 2; }