public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/92286] Possible improvement for -Wduplicated-cond warning
Date: Tue, 11 Oct 2022 08:54:27 +0000 [thread overview]
Message-ID: <bug-92286-4-nv7FQNj3SL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-92286-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92286
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
> trunk.git/libsanitizer/sanitizer_common/sanitizer_allocator_primary64.h:547:
> 27: style: Expression is always true because 'else if' condition is opposite
> to previous condition at line 538. [multiCondition]
This one is correct, but the code assumes there's no fallback edge:
...
} else if (chunk_size > page_size) {
// One chunk covers multiple pages, Some chunks are crossing page
// boundaries. Some pages contain one chunk, some contain two.
full_pages_chunk_count_max = 2;
same_chunk_count_per_page = false;
} else {
UNREACHABLE("All chunk_size/page_size ratios must be handled.");
}
Thus I'm going to leave it.
prev parent reply other threads:[~2022-10-11 8:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-92286-4@http.gcc.gnu.org/bugzilla/>
2022-10-10 18:59 ` dcb314 at hotmail dot com
2022-10-10 19:03 ` dcb314 at hotmail dot com
2022-10-11 8:54 ` marxin at gcc dot gnu.org [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-92286-4-nv7FQNj3SL@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).