public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/71345] Warn about redundant conditions
[not found] <bug-71345-4@http.gcc.gnu.org/bugzilla/>
@ 2021-12-12 4:29 ` egallager at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: egallager at gcc dot gnu.org @ 2021-12-12 4:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71345
--- Comment #3 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #2)
> A simpler case would be:
>
> int foo(int a, int b, int c)
> {
> if(b == c && b == c) return 1; /* warns with -Wlogical-op */
> if(a && b == c && b == c) return 2; /* missing warning */
> return 0;
> }
So, if the first one goes under -Wlogical-op, I take it that if a warning for
the second one were added, it's go under that same flag?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-12 4:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-71345-4@http.gcc.gnu.org/bugzilla/>
2021-12-12 4:29 ` [Bug c/71345] Warn about redundant conditions egallager at gcc dot gnu.org
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).