[{"id":3680339,"web_url":"http://patchwork.ozlabs.org/comment/3680339/","msgid":"<CACb0b4kLUyka4Wyz9k_n0fzae4+WcODJmV57-DRrHGy9c+PPVQ@mail.gmail.com>","list_archive_url":null,"date":"2026-04-22T08:57:37","subject":"Re: [PATCH] libstdc++: Add _GLIBCXX_RESOLVE_LIB_DEFECTS for alredy\n implemented issues.","submitter":{"id":48004,"url":"http://patchwork.ozlabs.org/api/people/48004/","name":"Jonathan Wakely","email":"jwakely@redhat.com"},"content":"On Wed, 22 Apr 2026 at 09:27, Tomasz Kamiński <tkaminsk@redhat.com> wrote:\n>\n> This covers issue affecting pre-C+26 features that were resolved\n> during 2026 Croydon meeting.\n>\n> libstdc++-v3/ChangeLog:\n>\n>         * include/bits/chrono_io.h: Add comment for LWG3831.\n>         * include/bits/print.h: Add comment for LWG4549.\n>         * include/std/condition_variable: Add comment for LWG3504.\n>         * include/std/format: Add comments for LWG4522.\n>         * include/std/inplace_vector: Add comment for LWG4122.\n>         * include/std/mdspan: Add comment for LWG4314.\n>         * include/std/optional: Add comment for LWG2746.\n> ---\n> OK for trunk?\n>\n>  libstdc++-v3/include/bits/chrono_io.h       | 2 ++\n>  libstdc++-v3/include/bits/print.h           | 2 ++\n>  libstdc++-v3/include/std/condition_variable | 2 ++\n>  libstdc++-v3/include/std/format             | 4 ++++\n>  libstdc++-v3/include/std/mdspan             | 2 ++\n>  libstdc++-v3/include/std/optional           | 2 ++\n>  6 files changed, 14 insertions(+)\n>\n> diff --git a/libstdc++-v3/include/bits/chrono_io.h b/libstdc++-v3/include/bits/chrono_io.h\n> index f5a0a65a48d..1fe50ad79e0 100644\n> --- a/libstdc++-v3/include/bits/chrono_io.h\n> +++ b/libstdc++-v3/include/bits/chrono_io.h\n> @@ -1313,6 +1313,8 @@ namespace __format\n>\n>           int __yi = (int)__y;\n>           const bool __is_neg = __yi < 0;\n> +         // _GLIBCXX_RESOLVE_LIB_DEFECTS\n> +         // 3831. Two-digit formatting of negative year is ambiguous\n>           __yi = __builtin_abs(__yi);\n>           int __ci = __yi / 100;\n>           // For floored division -123//100 is -2 and -100//100 is -1\n> diff --git a/libstdc++-v3/include/bits/print.h b/libstdc++-v3/include/bits/print.h\n> index 17567f2f554..20724844726 100644\n> --- a/libstdc++-v3/include/bits/print.h\n> +++ b/libstdc++-v3/include/bits/print.h\n> @@ -282,6 +282,8 @@ namespace __format\n>    vprint_nonunicode_buffered(FILE* __stream, string_view __fmt,\n>                              format_args __args)\n>    {\n> +    // _GLIBCXX_RESOLVE_LIB_DEFECTS\n> +    // 4549. vprint_nonunicode_buffered ignores its stream parameter\n\nI don't think this one needs to be here, it's almost editorial (and\nvprint_unicode_buffered wasn't even in C++23 anyway, it was added by a\nDR).\n\nThe commit summary line says \"alredy\" which should be \"already\".\n\nOK with that fixed, assuming all tests still pass (adding lines can\ncause dg-error line numbers to stop matching in tests).\n\n>      __format::_Str_sink<char> __buf;\n>      std::vformat_to(__buf.out(), __fmt, __args);\n>      auto __out = __buf.view();\n> diff --git a/libstdc++-v3/include/std/condition_variable b/libstdc++-v3/include/std/condition_variable\n> index 9e515123e7c..ce995ed5777 100644\n> --- a/libstdc++-v3/include/std/condition_variable\n> +++ b/libstdc++-v3/include/std/condition_variable\n> @@ -163,6 +163,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n>        wait_for(unique_lock<mutex>& __lock,\n>                const chrono::duration<_Rep, _Period>& __rtime)\n>        {\n> +       // _GLIBCXX_RESOLVE_LIB_DEFECTS\n> +       // 3504. condition_variable::wait_for is overspecified\n>         using __dur = typename steady_clock::duration;\n>         return wait_until(__lock,\n>                           steady_clock::now() +\n> diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format\n> index 92add1e0a01..4627381fa9e 100644\n> --- a/libstdc++-v3/include/std/format\n> +++ b/libstdc++-v3/include/std/format\n> @@ -1718,6 +1718,8 @@ namespace __format\n>             {\n>               _CharT __wbuf[__buf_size];\n>               size_t __n = __narrow_str.size();\n> +             // _GLIBCXX_RESOLVE_LIB_DEFECTS\n> +             // 4522. Clarify that `std::format` transcodes for `std::wformat_strings`\n>               std::__to_wstring_numeric(__narrow_str.data(), __n, __wbuf);\n>               return _M_format_int(basic_string_view<_CharT>(__wbuf, __n),\n>                                    __prefix_len, __fc);\n> @@ -2304,6 +2306,8 @@ namespace __format\n>  #ifdef _GLIBCXX_USE_WCHAR_T\n>           else\n>             {\n> +             // _GLIBCXX_RESOLVE_LIB_DEFECTS\n> +             // 4522. Clarify that `std::format` transcodes for `std::wformat_strings`\n>               __wstr = std::__to_wstring_numeric(__narrow_str);\n>               __str = __wstr;\n>             }\n> diff --git a/libstdc++-v3/include/std/mdspan b/libstdc++-v3/include/std/mdspan\n> index f30c5e83d16..14d8edc8ad1 100644\n> --- a/libstdc++-v3/include/std/mdspan\n> +++ b/libstdc++-v3/include/std/mdspan\n> @@ -103,6 +103,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n>           }\n>         else\n>           {\n> +           // _GLIBCXX_RESOLVE_LIB_DEFECTS\n> +           // 4314. Missing move in mdspan layout mapping::operator()\n>             auto __ret = static_cast<_IndexType>(std::forward<_OIndexTypeRef>(__other));\n>             if constexpr (std::is_signed_v<_IndexType>)\n>               __glibcxx_assert(__ret >= 0);\n> diff --git a/libstdc++-v3/include/std/optional b/libstdc++-v3/include/std/optional\n> index 49ba7b6b45d..d0fa306addb 100644\n> --- a/libstdc++-v3/include/std/optional\n> +++ b/libstdc++-v3/include/std/optional\n> @@ -1145,6 +1145,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n>           return *this;\n>         }\n>\n> +      // _GLIBCXX_RESOLVE_LIB_DEFECTS\n> +      // 2746. Inconsistency between requirements for emplace between optional and variant\n>        template<typename... _Args>\n>         _GLIBCXX20_CONSTEXPR\n>         enable_if_t<is_constructible_v<_Tp, _Args...>, _Tp&>\n> --\n> 2.53.0\n>","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=KC9LgZc7;\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=KC9LgZc7","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 4g0tTc4jQbz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 19:00:04 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id CA2144B9DB65\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 09:00:02 +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 344D64BA9011\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 08:57:56 +0000 (GMT)","from mail-yx1-f71.google.com (mail-yx1-f71.google.com\n [74.125.224.71]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-653-r5kCuZWnMWy-7G2n9MTU6g-1; Wed, 22 Apr 2026 04:57:54 -0400","by mail-yx1-f71.google.com with SMTP id\n 956f58d0204a3-65036e62f9bso4812359d50.3\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 01:57:54 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org CA2144B9DB65","OpenDKIM Filter v2.11.0 sourceware.org 344D64BA9011"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 344D64BA9011","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 344D64BA9011","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776848276; cv=none;\n b=bVjJ8f03xE8mzg3p7D6tBYbq17BFLBaWA9IGoo/m5jc4WNezP9mYI+/bXvOwu8jyrf3E8M7XJn9LsrBFr34OcDgRhjixWDViNFAf6795XyESfmnrJzlYjVUKBRErm3otr0Qn5k/4JlqrUVUQdzsQHhwEpEzaV7yewywmi6y9JFs=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776848276; c=relaxed/simple;\n bh=NKFO8UrQXBV3Po6FY/rx3vzab3e0QhYE37nrSfPVA/U=;\n h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;\n b=Jn54P5ApSrguHyEg0tinRKpE+a/FXYlU9Cm4dO70yITq1VGCJhVWz4OeO9rJTV3HtqegAvM/yg3SNZhJXvo5aiQ866Z4foHDRftOvXSM9miRqYfdDoWVmW2fJQVwu+e8M5+Fll8blMK4KbP1rh2upMlIzcN4W35jmhIyK7iZIW4=","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=1776848275;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=jl5wPUuJqNuKfjg8Etm24jJ2rWmtp1727Zke92Cjsiw=;\n b=KC9LgZc7bU5ZWIx9R2Tu3T7WgTk/7/6uOycIo5iujt8s8k9d7FhI19406Z/J8HBC2B44cM\n jGG2fOvMJJsHyn3zT+AcOicB0rsCv6017cukkh/+GHqquwDWXbFHtlJc52W8YlhLVkzznH\n 8aqOK8ng/ROMYbVrVGNw96AvcKRMXc8=","X-MC-Unique":"r5kCuZWnMWy-7G2n9MTU6g-1","X-Mimecast-MFC-AGG-ID":"r5kCuZWnMWy-7G2n9MTU6g_1776848274","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776848274; x=1777453074;\n h=content-transfer-encoding:cc:to:subject:message-id:date:from\n :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=jl5wPUuJqNuKfjg8Etm24jJ2rWmtp1727Zke92Cjsiw=;\n b=GWZC+s36NjD9jEEEIPXwRmgpjrHagS7mi2QiAxsnLc+10Z4mliRdYil8XeXaSVUdJn\n 8HPwBgVLmuLNNF6zB0UmsiBugzLSrlvFZBKLirwQdv5/VSQElb5lCoHlKGKhv2gB55u9\n tTufPTMv+/gfLUls4mhJ7Mo7DEfTc5zLgjS+EEo6dMNW9eva5BEvnlqR2wmgOgAWfmR6\n fayVN7Ym4RV3+JOq6LBdFMGT96xy5RTbmKu+O27kd5GsAChVoEPH6+iSFuqjIIjySha6\n wCaJRd2gj9VvzbLb2/sf2a36NJ1j0EtAiuXGi517QmPg7SOhleNIoomDs5m/LZq65OMC\n OlAA==","X-Forwarded-Encrypted":"i=1;\n AFNElJ9cXU10KvZA5kK0sMJA7MF7MDfEjmznVktRTthI52T8/3rX99HqL71oCdz9+TTqKf/rKPRpBll9WeU8ng==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YxI1i7usbOBU9gBa59BppLmlzUv87n+pnUH43Ws8y4J66+tbiqZ\n CMTtlfvN4odtfAESHxnZ5ri5NmVS+kfFvgUXcn8RwnBz+j8Sl6DiFZEHY5vfRwg0omPamupQIui\n 8g0+Pe2ncQjtp6y/sgnO3fAQRgcXgFPiJ9EgVq6hz03AN6Jo29y2IgwJegeAJn1iAK8LcTeGR2E\n KLVjTJmumAPvT/k+75cLTZ3aFqTV5Wwj2p2Q==","X-Gm-Gg":"AeBDieuwnpLIEt19pEIFerNcSWeSvccAtq5pmyHesfisJuglLO8TvSxbgp07kJMn0Rv\n OLLsRPaoCYzBLbun0g5KP6CzRdAzyl+yMe6V4n2xP3Cbfz5WGKATmiybiWSDzDfB2ZUZUQoFIXw\n qlAI0fzfgZQ0C0PdDHeRteZqd1Gf+hmXZhEsZPC0CSXSxr5wP+QawJq6eL5lBpvqzR9gcaVSfRl\n +jHy196fn2RQWs5TTa5SboSlZcdCuM7er3Li8zTkwDGmxqIim93UChqeNmv78NeDfA9AToSR6rj\n 7g==","X-Received":["by 2002:a05:690e:1285:b0:650:5f31:2334 with SMTP id\n 956f58d0204a3-65318a9082emr19053954d50.32.1776848273879;\n Wed, 22 Apr 2026 01:57:53 -0700 (PDT)","by 2002:a05:690e:1285:b0:650:5f31:2334 with SMTP id\n 956f58d0204a3-65318a9082emr19053948d50.32.1776848273401; Wed, 22 Apr 2026\n 01:57:53 -0700 (PDT)"],"MIME-Version":"1.0","References":"<20260422082732.318845-1-tkaminsk@redhat.com>","In-Reply-To":"<20260422082732.318845-1-tkaminsk@redhat.com>","From":"Jonathan Wakely <jwakely@redhat.com>","Date":"Wed, 22 Apr 2026 09:57:37 +0100","X-Gm-Features":"AQROBzAwCf1YpHSeKT3q60fb6G8w1qW7v_ES5_oUsCoI-hB12qB0MKKIPudbOdY","Message-ID":"\n <CACb0b4kLUyka4Wyz9k_n0fzae4+WcODJmV57-DRrHGy9c+PPVQ@mail.gmail.com>","Subject":"Re: [PATCH] libstdc++: Add _GLIBCXX_RESOLVE_LIB_DEFECTS for alredy\n implemented issues.","To":"=?utf-8?q?Tomasz_Kami=C5=84ski?= <tkaminsk@redhat.com>","Cc":"libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"SNnGkLD6kj6ckyjXsyNwZPvqrFdPr0cAQ8QBGE9hYQA_1776848274","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","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"}}]