public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/103848] New: std::deque<>::operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant"
@ 2021-12-28 2:24 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
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: stefan.bruens@rwth-aachen.de @ 2021-12-28 2:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
Bug ID: 103848
Summary: std::deque<>::operator- uses "0" for nullptr check,
triggers "zero-as-null-pointer-constant"
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: stefan.bruens@rwth-aachen.de
Target Milestone: ---
Since
https://github.com/gcc-mirror/gcc/commit/f6be5d6ee31b76838e242704782938bc9745659c
using `operator-` may fail:
```
[ 346s] In file included from /usr/include/c++/11/deque:67,
[ 346s] from /usr/include/c++/11/queue:60,
...
[ 346s] /usr/include/c++/11/bits/stl_deque.h:356:58: error: zero as null
pointer constant [-Werror=zero-as-null-pointer-constant]
[ 346s] 356 | * (__x._M_node - __y._M_node - int(__x._M_node !=
0))
[ 346s] | ~~~~~~~~~~~~^~~~
[ 346s] cc1plus: some warnings being treated as errors
```
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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 ` pinskia at gcc dot gnu.org
2022-01-04 13:38 ` rguenth at gcc dot gnu.org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-28 2:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-12-28
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Keywords| |diagnostic
Summary|std::deque<>::iterator |[11/12 Regression]
|operator- uses "0" for |std::deque<>::iterator
|nullptr check, triggers |operator- uses "0" for
|"zero-as-null-pointer-const |nullptr check, triggers
|ant" warning |"zero-as-null-pointer-const
| |ant" warning
Target Milestone|--- |11.0
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-04 13:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2022-01-04 14:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P3
Target Milestone|11.0 |11.3
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is not a bug.
Firstly, there's no testcase provided (as https://gcc.gnu.org/bugs says is
needed). Here's the missing testcase:
#include <deque>
std::deque<int> d;
auto n = d.begin() - d.begin();
Secondly, the command to reproduce the error is not provided, as the link also
says is needed. This "error" only happens with
-Werror=zero-as-null-pointer-constant -Wsystem-headers, so don't do that. This
is not even a warning unless you explicitly ask for it (it's not in -Wall or
-Wextra) and if you choose to make it an error, that's your fault.
We can't nullptr because the code needs to compile as C++98. We could use NULL
or __null, or Jakub suggested just _Map_pointer. I find all of those inferior
to 0 but I suppose we can change it.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (2 preceding siblings ...)
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
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-04 15:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I said - int(__x._M_node != _Map_pointer())
but indeed one doesn't know from looking at the code that it is comparison
against NULL.
Other options perhaps could be - (__x._M_node ? 1 : 0) or - 1 + !__x._M_node
or - !!__x._M_node
I'd hope the compiler treats all those the same, if not, we have something to
fix.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (3 preceding siblings ...)
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
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2022-01-04 15:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Other options perhaps could be - (__x._M_node ? 1 : 0)
That produces worse code (with a jump) at -O1
> or - 1 + !__x._M_node
Isn't that undefined for (x - y - 1 + !x) if x and y are both null?
We get (T*)0 - 1 + 1 which overflows twice.
> or - !!__x._M_node
I think that's what I'll go with, thanks.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (4 preceding siblings ...)
2022-01-04 15:42 ` redi at gcc dot gnu.org
@ 2022-01-04 15:58 ` redi at gcc dot gnu.org
2022-01-04 16:02 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2022-01-04 15:58 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (5 preceding siblings ...)
2022-01-04 15:58 ` redi at gcc dot gnu.org
@ 2022-01-04 16:02 ` jakub at gcc dot gnu.org
2022-01-04 16:18 ` redi at gcc dot gnu.org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-04 16:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> > or - 1 + !__x._M_node
>
> Isn't that undefined for (x - y - 1 + !x) if x and y are both null?
> We get (T*)0 - 1 + 1 which overflows twice.
You're right, it would need to be + (!__x.M_node - 1).
> > or - !!__x._M_node
>
> I think that's what I'll go with, thanks.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (6 preceding siblings ...)
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
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2022-01-04 16:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> (In reply to Jakub Jelinek from comment #3)
> > Other options perhaps could be - (__x._M_node ? 1 : 0)
>
> That produces worse code (with a jump) at -O1
Oops, no it doesn't, I testsed this intead:
(__x._M_node ? __x._M_node - __y._M_node - 1 : 0)
And that has a jump, because the compiler doesn't know that __x._M_node being
null implies __y._M_node is null too (because the standard says it's undefined
otherwise).
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (7 preceding siblings ...)
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
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: stefan.bruens@rwth-aachen.de @ 2022-01-05 3:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
--- Comment #8 from Stefan Brüns <stefan.bruens@rwth-aachen.de> ---
(In reply to Jonathan Wakely from comment #2)
> This is not a bug.
>
> Firstly, there's no testcase provided (as https://gcc.gnu.org/bugs says is
> needed). Here's the missing testcase:
>
> #include <deque>
> std::deque<int> d;
> auto n = d.begin() - d.begin();
>
> Secondly, the command to reproduce the error is not provided, as the link
> also says is needed. This "error" only happens with
> -Werror=zero-as-null-pointer-constant -Wsystem-headers, so don't do that.
> This is not even a warning unless you explicitly ask for it (it's not in
> -Wall or -Wextra) and if you choose to make it an error, that's your fault.
>
> We can't nullptr because the code needs to compile as C++98. We could use
> NULL or __null, or Jakub suggested just _Map_pointer. I find all of those
> inferior to 0 but I suppose we can change it.
Full GCC command line:
```
[ 826s] g++ -c -o test_allheaders_allheaders.o
-I/home/abuild/rpmbuild/BUILD/wxWidgets-3.1.5/lib/wx/include/gtk3-unicode-3.1
-I../include -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-3.0
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libmount
-I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/uuid
-I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng16
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0
-I/usr/include/wayland -I/usr/include/libxkbcommon -I/usr/include/atk-1.0
-I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0
-I/usr/lib64/dbus-1.0/include -I/usr/include/at-spi-2.0 -pthread -D__WXGTK__
-I. -DWXUSINGDLL -I./../samples -I../3rdparty/catch/include -pthread -Wall
-Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual
-Wno-deprecated-declarations -I/usr/include/freetype2 -I/usr/include/uuid
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/harfbuzz -I/usr/include/libmount -I/usr/include/blkid
-I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1
-I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0
-I/usr/include/gtk-3.0/unix-print -I/usr/include/gtk-3.0
-I/usr/include/gio-unix-2.0 -I/usr/include/wayland -I/usr/include/libxkbcommon
-I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0
-I/usr/lib64/dbus-1.0/include -I/usr/include/at-spi-2.0 -I/usr/include/SDL2
-D_REENTRANT -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables
-fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type
-flto=auto -g -I/usr/include/webkitgtk-4.0 -I/usr/include/libsoup-2.4
-I/usr/include/libxml2 -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4
-fvisibility=hidden -fvisibility-inlines-hidden -fPIC -DPIC -O2 -Wall
-D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables
-fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type
-flto=auto -g ./allheaders.cpp
[ 826s] In file included from /usr/include/c++/11/deque:67,
[ 826s] from /usr/include/c++/11/queue:60,
[ 826s] from ../include/wx/msgqueue.h:24,
[ 826s] from ./allheaders.h:239,
[ 826s] from ./allheaders.cpp:435:
```
So definitely neither -Werror=zero-as-null-pointer-constant nor
-Wsystem-headers.
GCC -v
```
Using built-in specs.
Reading specs from /usr/lib64/gcc/x86_64-suse-linux/11/defaults.spec
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d,jit
--enable-offload-targets=nvptx-none,amdgcn-amdhsa, --without-cuda-driver
--enable-host-shared --enable-checking=release --disable-werror
--with-gxx-include-dir=/usr/include/c++/11 --enable-ssp --disable-libssp
--disable-libvtv --enable-cet=auto --disable-libcc1 --enable-plugin
--with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new
--disable-libstdcxx-pch --enable-libphobos
--enable-version-specific-runtime-libs --with-gcc-major-version-only
--enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function
--program-suffix=-11 --without-system-libunwind --enable-multilib
--with-arch-32=x86-64 --with-tune=generic
--with-build-config=bootstrap-lto-lean --enable-link-mutex
--build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.1 20211124 [revision 7510c23c1ec53aa4a62705f0384079661342ff7b]
(SUSE Linux)
```
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (8 preceding siblings ...)
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
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2022-01-05 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Either that isn't the correct g++ command, or something in the code you're
compiling uses "#pragma GCC diagnostic error ..." to enable the warning.
There is no way to get an *error* from a non-default warning in a system header
otherwise.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (9 preceding siblings ...)
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
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-05 9:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Please rerun that command with -c -o test_allheaders_allheaders.o replaced with
-E -dD -o test_allheaders_allheaders.ii
Then compress it and attach here.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11/12 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (10 preceding siblings ...)
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
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-05 13:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:76a45931ab7c831e32cebf13a6317e5e142f8151
commit r12-6261-g76a45931ab7c831e32cebf13a6317e5e142f8151
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Jan 4 21:57:16 2022 +0000
libstdc++: Avoid -Wzero-as-null-pointer-constant warning [PR103848]
libstdc++-v3/ChangeLog:
PR libstdc++/103848
* include/bits/stl_deque.h (operator-): Do not use 0 as null
pointer constant.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (11 preceding siblings ...)
2022-01-05 13:47 ` cvs-commit at gcc dot gnu.org
@ 2022-04-21 7:51 ` 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
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-21 7:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.3 |11.4
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.3 is being released, retargeting bugs to GCC 11.4.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (12 preceding siblings ...)
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
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-21 12:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:b59435ff6069583290c8e0953a58044f598a348c
commit r11-9899-gb59435ff6069583290c8e0953a58044f598a348c
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Jan 4 21:57:16 2022 +0000
libstdc++: Avoid -Wzero-as-null-pointer-constant warning [PR103848]
libstdc++-v3/ChangeLog:
PR libstdc++/103848
* include/bits/stl_deque.h (operator-): Do not use 0 as null
pointer constant.
(cherry picked from commit 76a45931ab7c831e32cebf13a6317e5e142f8151)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/103848] [11 Regression] std::deque<>::iterator operator- uses "0" for nullptr check, triggers "zero-as-null-pointer-constant" warning
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
` (13 preceding siblings ...)
2022-04-21 12:32 ` cvs-commit at gcc dot gnu.org
@ 2022-04-21 12:39 ` redi at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2022-04-21 12:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103848
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 11.4
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2022-04-21 12:39 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
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).