From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 8616A3858420 for ; Fri, 4 Feb 2022 15:27:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8616A3858420 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-649-9s5KzWN1NWCDx6uRpiwElQ-1; Fri, 04 Feb 2022 10:27:45 -0500 X-MC-Unique: 9s5KzWN1NWCDx6uRpiwElQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D2A0693920; Fri, 4 Feb 2022 15:27:44 +0000 (UTC) Received: from localhost (unknown [10.33.37.88]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8343B798B8; Fri, 4 Feb 2022 15:27:44 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] doc: Update references to "C++2a" in cpp.texi Date: Fri, 4 Feb 2022 15:27:43 +0000 Message-Id: <20220204152743.2632220-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Feb 2022 15:27:49 -0000 Committed as obvious. gcc/ChangeLog: * doc/cpp.texi (Variadic Macros): Replace C++2a with C++20. --- gcc/doc/cpp.texi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index d4290fefb41..90b2767e39a 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -1678,7 +1678,7 @@ This formulation looks more descriptive, but historically it was less flexible: you had to supply at least one argument after the format string. In standard C, you could not omit the comma separating the named argument from the variable arguments. (Note that this -restriction has been lifted in C++2a, and never existed in GNU C; see +restriction has been lifted in C++20, and never existed in GNU C; see below.) Furthermore, if you left the variable argument empty, you would have @@ -1690,10 +1690,10 @@ eprintf("success!\n", ); @expansion{} fprintf(stderr, "success!\n", ); @end smallexample -This has been fixed in C++2a, and GNU CPP also has a pair of +This has been fixed in C++20, and GNU CPP also has a pair of extensions which deal with this problem. -First, in GNU CPP, and in C++ beginning in C++2a, you are allowed to +First, in GNU CPP, and in C++ beginning in C++20, you are allowed to leave the variable argument out entirely: @smallexample @@ -1702,7 +1702,7 @@ eprintf ("success!\n") @end smallexample @noindent -Second, C++2a introduces the @code{@w{__VA_OPT__}} function macro. +Second, C++20 introduces the @code{@w{__VA_OPT__}} function macro. This macro may only appear in the definition of a variadic macro. If the variable argument has any tokens, then a @code{@w{__VA_OPT__}} invocation expands to its argument; but if the variable argument does -- 2.34.1