public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
Date: Tue, 04 Jan 2022 15:58:48 +0000 [thread overview]
Message-ID: <bug-103848-4-YTmO59jqEX@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103848-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> We get (T*)0 - 1 + 1 which overflows twice.
GCC's ubsan doesn't diagnose this, but Clang's does.
next prev parent reply other threads:[~2022-01-04 15:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-28 2:24 [Bug libstdc++/103848] New: std::deque<>::operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" stefan.bruens@rwth-aachen.de
2021-12-28 2:39 ` [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning pinskia at gcc dot gnu.org
2022-01-04 13:38 ` rguenth at gcc dot gnu.org
2022-01-04 14:31 ` redi at gcc dot gnu.org
2022-01-04 15:15 ` jakub at gcc dot gnu.org
2022-01-04 15:42 ` redi at gcc dot gnu.org
2022-01-04 15:58 ` redi at gcc dot gnu.org [this message]
2022-01-04 16:02 ` jakub at gcc dot gnu.org
2022-01-04 16:18 ` redi at gcc dot gnu.org
2022-01-05 3:08 ` stefan.bruens@rwth-aachen.de
2022-01-05 9:22 ` redi at gcc dot gnu.org
2022-01-05 9:31 ` jakub at gcc dot gnu.org
2022-01-05 13:47 ` cvs-commit at gcc dot gnu.org
2022-04-21 7:51 ` [Bug libstdc++/103848] [11 " rguenth at gcc dot gnu.org
2022-04-21 12:32 ` cvs-commit at gcc dot gnu.org
2022-04-21 12:39 ` redi at gcc dot gnu.org
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-103848-4-YTmO59jqEX@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).