diff mbox series

[pushed] libstdc++: avoid -Wzero-as-null-pointer-constant

Message ID 20240828094033.1684579-1-jason@redhat.com
State New
Headers show
Series [pushed] libstdc++: avoid -Wzero-as-null-pointer-constant | expand

Commit Message

Jason Merrill Aug. 28, 2024, 9:40 a.m. UTC
Tested x86_64-pc-linux-gnu, applying to trunk as obvious.

-- 8< --

libstdc++-v3/ChangeLog:

	* include/std/coroutine (coroutine_handle): Use nullptr instead of
	0 as initializer for _M_fr_ptr.
---
 libstdc++-v3/include/std/coroutine | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 7b500fa34ad88d5fdd4bf74eb2737b214749075b
diff mbox series

Patch

diff --git a/libstdc++-v3/include/std/coroutine b/libstdc++-v3/include/std/coroutine
index 908c1178a14..ccd016b255e 100644
--- a/libstdc++-v3/include/std/coroutine
+++ b/libstdc++-v3/include/std/coroutine
@@ -99,7 +99,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     {
     public:
       // [coroutine.handle.con], construct/reset
-      constexpr coroutine_handle() noexcept : _M_fr_ptr(0) {}
+      constexpr coroutine_handle() noexcept : _M_fr_ptr(nullptr) {}
 
       constexpr coroutine_handle(std::nullptr_t __h) noexcept
 	: _M_fr_ptr(__h)