This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/81851] missing -Wduplicated-branches on if and return statements with no else
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 25 Aug 2017 19:07:50 +0000
- Subject: [Bug c/81851] missing -Wduplicated-branches on if and return statements with no else
- Auto-submitted: auto-generated
- References: <bug-81851-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81851
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egallager at gcc dot gnu.org
Severity|normal |enhancement
--- Comment #2 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #1)
> Definitely not a bug, I never intended that the warning detects the latter
> case. And it's not an easy enhancement, either.
Yeah it's not really what I think of as "branches" when there's no else. And
sometimes I write code like that on purpose.