{"id":2225909,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2225909/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/20260421200653.10253-1-jwakely@redhat.com/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.2/projects/17/?format=json","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":"<20260421200653.10253-1-jwakely@redhat.com>","list_archive_url":null,"date":"2026-04-21T20:06:42","name":"[committed] libstdc++: Fix comment on std::print helper __open_terminal","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"a4f87e6ba99fb1185f988a49b2d66c51e76d8737","submitter":{"id":48004,"url":"http://patchwork.ozlabs.org/api/1.2/people/48004/?format=json","name":"Jonathan Wakely","email":"jwakely@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/20260421200653.10253-1-jwakely@redhat.com/mbox/","series":[{"id":500887,"url":"http://patchwork.ozlabs.org/api/1.2/series/500887/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=500887","date":"2026-04-21T20:06:42","name":"[committed] libstdc++: Fix comment on std::print helper __open_terminal","version":1,"mbox":"http://patchwork.ozlabs.org/series/500887/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2225909/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2225909/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=i4z/RdxH;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.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=i4z/RdxH","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 [38.145.34.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 4g0YLD2Cj3z1yGs\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 06:07:29 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 60FFF4B9DB46\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 20:07:27 +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 D1B6C4BA9020\n for <gcc-patches@gcc.gnu.org>; Tue, 21 Apr 2026 20:07:00 +0000 (GMT)","from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-57-89LLVVduONmB4md4VFuQEg-1; Tue,\n 21 Apr 2026 16:06:57 -0400","from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])\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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 2FE39195609F; Tue, 21 Apr 2026 20:06:56 +0000 (UTC)","from zen.kayari.org (unknown [10.44.32.55])\n by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 09A0C3000C21; Tue, 21 Apr 2026 20:06:54 +0000 (UTC)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 60FFF4B9DB46","OpenDKIM Filter v2.11.0 sourceware.org D1B6C4BA9020"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org D1B6C4BA9020","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org D1B6C4BA9020","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776802020; cv=none;\n b=q1PsPIW+QwOkFpMjY4DSendXXTwgcuWLo2MI5vlk9fajqOp0FG8W2idoQgD0916xOBI32p9mQzN+zHF4ZfB1pD2C5dYzjzGPRpq+oYD4yEbyIorbpY6/P9KPDYPbtitW/M773rkR4M7ES8vSExI+sne+F4ZoQyb3mkI3OstjHl8=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776802020; c=relaxed/simple;\n bh=YYraGy4YrhjcJvFhuAEIKcUxZyVmj2WWyzKRFGMpMx4=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=Vb/GmAOCQlarpHPEMmLmHi9kYpjNCeBDZHGiNya2vAUsZ65Bquv78JhTnDwj88LG9cBFrp3XpnG5yuDLlemlJ2cqAC2UOD3VNtMJWq2pieskLmOCUEjPL/judkx5SZZb0eryOaOenaoasHiL9k8sXn2G5PrQ3mIL4/VlkGb4piQ=","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=1776802020;\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=9OkYN0yoDU2jX865xQV9jAdWtzQWGNG5wGkd1O1ZXiY=;\n b=i4z/RdxHTn2EmDyOR9mjj6mA/iUAWr5oDfnTrX+fcOXCZu3K5Ne4B3a76aLGvMCfPPjqNG\n xuOQgwAclwNbbO04pcgwcTf4ZbqefGPVhhzWJCa/vYaL5GLxj43BODScMzUthjuxZSlESk\n bBwOx1Mw2MlAPgigg0JDKQoz+0JvDu0=","X-MC-Unique":"89LLVVduONmB4md4VFuQEg-1","X-Mimecast-MFC-AGG-ID":"89LLVVduONmB4md4VFuQEg_1776802016","From":"Jonathan Wakely <jwakely@redhat.com>","To":"libstdc++@gcc.gnu.org,\n\tgcc-patches@gcc.gnu.org","Subject":"[committed] libstdc++: Fix comment on std::print helper\n __open_terminal","Date":"Tue, 21 Apr 2026 21:06:42 +0100","Message-ID":"<20260421200653.10253-1-jwakely@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.30.177.4","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"BLDhO8g230armlxPAh3izIDJ1SrKjBVTw2T36WK1hAw_1776802016","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","Content-Transfer-Encoding":"8bit","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":"The comment describes an earlier version of the function which I\nexperimented with when implementing the std::print feature. Update it to\ndescribe the current semantics.\n\nlibstdc++-v3/ChangeLog:\n\n\t* src/c++23/print.cc (__open_terminal): Fix comment.\n---\n\nPushed to trunk.\n\n libstdc++-v3/src/c++23/print.cc | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)","diff":"diff --git a/libstdc++-v3/src/c++23/print.cc b/libstdc++-v3/src/c++23/print.cc\nindex 290e0b8dfa2d..a12c50bfb6a8 100644\n--- a/libstdc++-v3/src/c++23/print.cc\n+++ b/libstdc++-v3/src/c++23/print.cc\n@@ -75,8 +75,9 @@ namespace\n } // namespace\n #endif\n \n-  // This returns intptr_t that is either a Windows HANDLE\n-  // or 1 + a POSIX file descriptor. A zero return indicates failure.\n+  // Windows: If `f` refers to a console, return the HANDLE associated with it.\n+  // POSIX: If `f` refers to a POSIX terminal, return `f`.\n+  // Return a null pointer if `f` is not known to be a console or terminal.\n   void*\n   __open_terminal([[maybe_unused]] FILE* f)\n   {\n@@ -95,6 +96,7 @@ namespace\n     return nullptr;\n   }\n \n+  // If a `FILE*` can be obtained from `sb`, behave as above.\n   void*\n   __open_terminal([[maybe_unused]] std::streambuf* sb)\n   {\n","prefixes":["committed"]}