From patchwork Thu Oct 31 08:18:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 99897 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 127753857836 for ; Thu, 31 Oct 2024 08:19:29 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 2F9F7385843B for ; Thu, 31 Oct 2024 08:19:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2F9F7385843B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2F9F7385843B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730362743; cv=none; b=mThk2bIWNgoHCTI3NUNEpSpzuZ1y9Z08fGaPDe8pgfdeAN/qrT2dUhvuo7G/jn3kJ+9fNyyjPSBnO6o0H6MrwGVDVWdqXemeLZn3xj/54uOETEBDBYLm74uoL0zV0+i8kDhDFU64xzunh/MB8B3/yR+sMiZ0BIq223nqq4F8ITk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730362743; c=relaxed/simple; bh=6zNqoooa38vax5U5TkDzQguSDzZhe8F3QwMqMRKJCdE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=YKb86//spwcNxiSQ7IoPYifs9CuOkoZDXZizmrpmXf88pB/kqNwjfzJzNRwNZ+7+AHNOjhfaeL6nJSqxFBJMOv0A8bMiDdYrwZm7ToXhYMCMNpOvkRh+BmHPPWOU2JdYslhmUI93iKNGKqmN/CZDgfMHL+S7waSh0/hTA9cNDZo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730362739; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=F3LoUiHIK22S5xKc5XVDgtZA3lFpEPCYf9h/UqPRIyE=; b=OprqSjAhayzQH01y//LpAobgkbuNY9/FZVI0mUXCmILoWKdvzrWAcAYcGOrg6I/HvyNjvr 5Td3c2qNgnclsIVVgrFEcOK/SN4KbkgKwsstnHGlnR9YrRD4G2XwJw9Qe4waKtoBc++Emh KCQbcKI1aPcq01n8em7uSDA81PurmBo= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-116-O2Vx_mplOdaGmg8rcGUdEQ-1; Thu, 31 Oct 2024 04:18:57 -0400 X-MC-Unique: O2Vx_mplOdaGmg8rcGUdEQ-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7E75A1956080 for ; Thu, 31 Oct 2024 08:18:56 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.16]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 08D7F1956086; Thu, 31 Oct 2024 08:18:55 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 49V8Iqac765730 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 31 Oct 2024 09:18:53 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 49V8IqRZ765729; Thu, 31 Oct 2024 09:18:52 +0100 Date: Thu, 31 Oct 2024 09:18:52 +0100 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches@gcc.gnu.org, Jonathan Wakely Subject: [PATCH] c++: Adjust docs and option descriptions for the publishing of C++23 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org Hi! Now that C++23 has been finally published, the following patch attempts to mention it in the option descriptions and documentation. Given that it has been published about 1.5 years after being finalized and has the 14882:2024 document number pair rather than :2023, I wasn't sure when exactly to use 2023 (as informal name) and when 2024 (as year of publishing), so I've tried to use 2024 in standards.texi which talks more formally about the standards and a note that it has been published in 2024 when it is talked about more informally. I remember at least one older edition has been published in January too, but the ISO pages pretend it was published still in December of the previous year, in this case it doesn't. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-10-31 Jakub Jelinek gcc/doc/ * doc/standards.texi (C++ Language): Mention also the 2024 revision and -std=gnu++23 option. * doc/invoke.texi (-std=): Adjust description of c++23, c++2b, gnu++23 and gnu++2b now that ISO C++ 14882:2024 is published. gcc/c-family/ * c.opt (std=c++2b, std=c++23, std=gnu++2b, std=gnu++23): Adjust description now that ISO C++ 14882:2024 is published. Jakub --- gcc/c-family/c.opt.jj 2024-10-27 16:42:47.992446624 +0100 +++ gcc/c-family/c.opt 2024-10-30 20:18:32.153034519 +0100 @@ -2558,11 +2558,11 @@ Conform to the ISO 2020 C++ standard (ex std=c++2b C++ ObjC++ Alias(std=c++23) Undocumented -Conform to the ISO 2023 C++ draft standard (experimental and incomplete support). +Conform to the ISO 2023 C++ standard (published in 2024; experimental and incomplete support). std=c++23 C++ ObjC++ -Conform to the ISO 2023 C++ draft standard (experimental and incomplete support). +Conform to the ISO 2023 C++ standard (published in 2024; experimental and incomplete support). std=c++2c C++ ObjC++ Alias(std=c++26) @@ -2660,11 +2660,11 @@ Conform to the ISO 2020 C++ standard wit std=gnu++2b C++ ObjC++ Alias(std=gnu++23) Undocumented -Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support). +Conform to the ISO 2023 C++ standard with GNU extensions (published in 2024; experimental and incomplete support). std=gnu++23 C++ ObjC++ -Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support). +Conform to the ISO 2023 C++ standard with GNU extensions (published in 2024; experimental and incomplete support). std=gnu++2c C++ ObjC++ Alias(std=gnu++26) --- gcc/doc/standards.texi.jj 2024-06-14 19:45:08.138794749 +0200 +++ gcc/doc/standards.texi 2024-10-30 20:20:45.322155825 +0100 @@ -204,7 +204,7 @@ information concerning the history of C @section C++ Language GCC supports the original ISO C++ standard published in 1998, -and the 2011, 2014, 2017 and mostly 2020 revisions. +and the 2011, 2014, 2017 and mostly 2020 and 2024 revisions. The original ISO C++ standard was published as the ISO standard (ISO/IEC 14882:1998) and amended by a Technical Corrigenda published in 2003 @@ -245,6 +245,13 @@ new specification. For further details @uref{https://gcc.gnu.org/projects/@/cxx-status.html#cxx20}. To select this standard in GCC, use the option @option{-std=c++20}. +Yet another revised ISO C++ standard was published in 2024 as ISO/IEC +14882:2024, and is referred to as C++23; before its publication it was +sometimes referred to as C++2b. GCC supports most of the changes in the +new specification. For further details see +@uref{https://gcc.gnu.org/projects/@/cxx-status.html#cxx23}. +To select this standard in GCC, use the option @option{-std=c++23}. + More information about the C++ standards is available on the ISO C++ committee's web site at @uref{https://www.open-std.org/@/jtc1/@/sc22/@/wg21/}. @@ -263,7 +270,8 @@ select an extended version of the C++ la @option{-std=gnu++11} (for C++11 with GNU extensions), or @option{-std=gnu++14} (for C++14 with GNU extensions), or @option{-std=gnu++17} (for C++17 with GNU extensions), or -@option{-std=gnu++20} (for C++20 with GNU extensions). +@option{-std=gnu++20} (for C++20 with GNU extensions), or +@option{-std=gnu++23} (for C++23 with GNU extensions). The default, if no C++ language dialect options are given, is @option{-std=gnu++17}. --- gcc/doc/invoke.texi.jj 2024-10-30 07:57:03.622735779 +0100 +++ gcc/doc/invoke.texi 2024-10-30 20:19:13.849446284 +0100 @@ -2568,17 +2568,19 @@ Support is experimental, and could chang future releases. The name @samp{gnu++2a} is deprecated. -@item c++2b -@itemx c++23 -The next revision of the ISO C++ standard, planned for -2023. Support is highly experimental, and will almost certainly -change in incompatible ways in future releases. +@item c++23 +@itemx c++2b +The 2023 ISO C++ standard plus amendments (published in 2024). +Support is experimental, and could change in incompatible ways in +future releases. +The name @samp{c++2b} is deprecated. -@item gnu++2b -@itemx gnu++23 -GNU dialect of @option{-std=c++2b}. Support is highly experimental, -and will almost certainly change in incompatible ways in future -releases. +@item gnu++23 +@itemx gnu++2b +GNU dialect of @option{-std=c++23}. +Support is experimental, and could change in incompatible ways in +future releases. +The name @samp{gnu++2b} is deprecated. @item c++2c @itemx c++26