Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217390/?format=api
{ "id": 2217390, "url": "http://patchwork.ozlabs.org/api/patches/2217390/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260328135015.23328-1-tkaminsk@redhat.com/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260328135015.23328-1-tkaminsk@redhat.com>", "list_archive_url": null, "date": "2026-03-28T13:44:52", "name": "libstdc++: Change atomic_ref::address return type to cv void*.", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "310e2748c7491d97861bdd44be2a0dd00e238a49", "submitter": { "id": 90409, "url": "http://patchwork.ozlabs.org/api/people/90409/?format=api", "name": "Tomasz Kaminski", "email": "tkaminsk@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260328135015.23328-1-tkaminsk@redhat.com/mbox/", "series": [ { "id": 497869, "url": "http://patchwork.ozlabs.org/api/series/497869/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=497869", "date": "2026-03-28T13:44:52", "name": "libstdc++: Change atomic_ref::address return type to cv void*.", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497869/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2217390/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2217390/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=ekPjyVNZ;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=ekPjyVNZ", "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "sourceware.org; spf=pass smtp.mailfrom=redhat.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.129.124" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fjf6v6wqYz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 29 Mar 2026 00:51:02 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id D86084BA9010\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 13:51:00 +0000 (GMT)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id 6F42F4BA23D1\n for <gcc-patches@gcc.gnu.org>; Sat, 28 Mar 2026 13:50:22 +0000 (GMT)", "from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-355-g6jGXPqyMHuFzVnIV_4VxA-1; Sat,\n 28 Mar 2026 09:50:18 -0400", "from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 86C27180047F; Sat, 28 Mar 2026 13:50:17 +0000 (UTC)", "from localhost (unknown [10.44.32.5])\n by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id C342819560B1; Sat, 28 Mar 2026 13:50:16 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org D86084BA9010", "OpenDKIM Filter v2.11.0 sourceware.org 6F42F4BA23D1" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 6F42F4BA23D1", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 6F42F4BA23D1", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774705822; cv=none;\n b=Pay9/V4vw+3wMEtTte336OzyALUxOpbPOzSjjNhJ+MQZ5WwhS2j8uF6xXktPZ2Py6dn0n7m0oKcPbDtfwaS5ssbIp4zdWTJ+OA2rkW0grHsxWB1UuufSp7pk6wEWSklKHljObxhCqaw2k6JA+cJEACSz/+j06KWacgdaY0VCTAE=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774705822; c=relaxed/simple;\n bh=lqx4OsCERBPcnemcrTX05KrJJf9in+pAoXoBtULpbL4=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=RmBkPzk5hJ3y8erEKGoo/ACmIpogvcKFspN8mpB+HL+4wZyM6RdjY635duRbjZUpWUbkd8NuMSbSbt8WNBK1Pra/D5+2f32s8+aiWef3TqcKwkXHg/uzTQTPkKBOWOKG9Dy8ccLn0ROtHfdVD/SJIOcalziC1cBHRC1FrwnD+I0=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1774705822;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=jD7UpUOfGm5SzF3yTGPYN4x7NeTfoKKCace6CVVdQYM=;\n b=ekPjyVNZyR4OhxzvsFkWj3yLS+XzGW6j6a5t+Y95A2HfPjAXyj1UQlGV0AUVlHaXUflFfj\n hq4MqAWo/jl8g+zCXKTipcGeS+/383mNNxHaME/lBc89d13YsLRbq2U7zKaeS1kGvSIscN\n IcHsfvAN0r6q4zfn6xPpa+ddV8ugzIw=", "X-MC-Unique": "g6jGXPqyMHuFzVnIV_4VxA-1", "X-Mimecast-MFC-AGG-ID": "g6jGXPqyMHuFzVnIV_4VxA_1774705817", "From": "=?utf-8?q?Tomasz_Kami=C5=84ski?= <tkaminsk@redhat.com>", "To": "libstdc++@gcc.gnu.org,\n\tgcc-patches@gcc.gnu.org", "Subject": "[PATCH] libstdc++: Change atomic_ref::address return type to cv\n void*.", "Date": "Sat, 28 Mar 2026 14:44:52 +0100", "Message-ID": "<20260328135015.23328-1-tkaminsk@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.12", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "KfcR1un4t0cCTGuqJnAooiroRuuArdqqt_MA7TbNLo0_1774705817", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true", "X-BeenThere": "gcc-patches@gcc.gnu.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>", "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>", "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "This implements with P3936R1 Safer atomic_ref::address with\nthe bump to __cpp_lib_atomic_ref feture test macro.\n\nlibstdc++-v3/ChangeLog:\n\n\t* include/bits/atomic_base.h (__atomic_ref_base::_Address_return_t):\n\tDefine.\n\t(__atomic_ref_base::address): Change return type to _Address_return_t.\n\t* include/bits/version.def (atomic_ref): Bump to 202503.\n\t* include/bits/version.h: Regenerate.\n\t* testsuite/29_atomics/atomic_ref/address.cc: Update check for\n\treturn type.\n---\nTested *atomic_ref* on x86_64-linux.\nOK for trunk when full testsuite passes?\n\n libstdc++-v3/include/bits/atomic_base.h | 10 ++++++++--\n libstdc++-v3/include/bits/version.def | 2 +-\n libstdc++-v3/include/bits/version.h | 4 ++--\n .../testsuite/29_atomics/atomic_ref/address.cc | 12 ++++++------\n 4 files changed, 17 insertions(+), 11 deletions(-)", "diff": "diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h\nindex 6c5b83a0818..62970108ea6 100644\n--- a/libstdc++-v3/include/bits/atomic_base.h\n+++ b/libstdc++-v3/include/bits/atomic_base.h\n@@ -1649,6 +1649,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n {\n private:\n using _Vt = remove_cv_t<_Tp>;\n+ using _Address_return_t = __conditional_t<is_volatile_v<_Tp>,\n+\t\t\t\t\t\tconst volatile void*, const void*>;\n \n static consteval bool\n _S_is_always_lock_free()\n@@ -1714,7 +1716,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n #endif // __glibcxx_atomic_wait\n \n #if __glibcxx_atomic_ref >= 202411L\n- _GLIBCXX_ALWAYS_INLINE constexpr const _Tp*\n+ _GLIBCXX_ALWAYS_INLINE constexpr const _Address_return_t\n address() const noexcept\n { return _M_ptr; }\n #endif // __glibcxx_atomic_ref >= 202411L\n@@ -1727,6 +1729,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n struct __atomic_ref_base\n : __atomic_ref_base<const _Tp>\n {\n+ using _Address_return_t = __conditional_t<is_volatile_v<_Tp>,\n+\t\t\t\t\t\tvolatile void*, void*>;\n+\n+ public:\n using value_type = typename __atomic_ref_base<const _Tp>::value_type;\n \n explicit\n@@ -1807,7 +1813,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n #endif // __glibcxx_atomic_wait\n \n #if __glibcxx_atomic_ref >= 202411L\n- _GLIBCXX_ALWAYS_INLINE constexpr _Tp*\n+ _GLIBCXX_ALWAYS_INLINE constexpr _Address_return_t\n address() const noexcept\n { return this->_M_ptr; }\n #endif // __glibcxx_atomic_ref >= 202411L\ndiff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def\nindex dd77524b5a9..5aaf1550829 100644\n--- a/libstdc++-v3/include/bits/version.def\n+++ b/libstdc++-v3/include/bits/version.def\n@@ -817,7 +817,7 @@ ftms = {\n ftms = {\n name = atomic_ref;\n values = {\n- v = 202411;\n+ v = 202503;\n cxxmin = 26;\n };\n values = {\ndiff --git a/libstdc++-v3/include/bits/version.h b/libstdc++-v3/include/bits/version.h\nindex bef61baeba8..ed1f0028691 100644\n--- a/libstdc++-v3/include/bits/version.h\n+++ b/libstdc++-v3/include/bits/version.h\n@@ -910,9 +910,9 @@\n \n #if !defined(__cpp_lib_atomic_ref)\n # if (__cplusplus > 202302L)\n-# define __glibcxx_atomic_ref 202411L\n+# define __glibcxx_atomic_ref 202503L\n # if defined(__glibcxx_want_all) || defined(__glibcxx_want_atomic_ref)\n-# define __cpp_lib_atomic_ref 202411L\n+# define __cpp_lib_atomic_ref 202503L\n # endif\n # elif (__cplusplus >= 202002L)\n # define __glibcxx_atomic_ref 201806L\ndiff --git a/libstdc++-v3/testsuite/29_atomics/atomic_ref/address.cc b/libstdc++-v3/testsuite/29_atomics/atomic_ref/address.cc\nindex e2eda506efa..d4bb500185e 100644\n--- a/libstdc++-v3/testsuite/29_atomics/atomic_ref/address.cc\n+++ b/libstdc++-v3/testsuite/29_atomics/atomic_ref/address.cc\n@@ -8,26 +8,26 @@\n \n #include <testsuite_hooks.h>\n \n-template <typename T>\n+template <typename T, typename CVV>\n void testAtomicRefAddress()\n {\n T x(T(42));\n const std::atomic_ref<T> a(x);\n \n static_assert( noexcept(a.address()) );\n- static_assert( std::is_same_v<decltype(a.address()), T*> );\n+ static_assert( std::is_same_v<decltype(a.address()), CVV*> );\n VERIFY( std::addressof(x) == a.address() );\n }\n \n template <typename T>\n void testAtomicRefAddressForCV()\n {\n- testAtomicRefAddress<T>();\n- testAtomicRefAddress<const T>();\n+ testAtomicRefAddress<T, void>();\n+ testAtomicRefAddress<const T, const void>();\n if constexpr (std::atomic_ref<T>::is_always_lock_free)\n {\n- testAtomicRefAddress<volatile T>();\n- testAtomicRefAddress<const volatile T>();\n+ testAtomicRefAddress<volatile T, volatile void>();\n+ testAtomicRefAddress<const volatile T, const volatile void>();\n }\n }\n \n", "prefixes": [] }