From patchwork Mon Oct 30 15:10:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 159810 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp2350625vqb; Mon, 30 Oct 2023 09:44:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNK7svU+reODZE/ItBv1Hz8ING2KjBysZlkyIYzEOnhregAsly/76mhDSX66dRF7uIFIsk X-Received: by 2002:ac8:7d8f:0:b0:41e:3de2:c8ff with SMTP id c15-20020ac87d8f000000b0041e3de2c8ffmr14240309qtd.51.1698684291010; Mon, 30 Oct 2023 09:44:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698684290; cv=pass; d=google.com; s=arc-20160816; b=u2XQY1OxAxnK1cd7HHz34BM6VkZvWBokCU4q0J4vzXFfa2WrrOJDhyfUnbkzex1L78 WPtwq9fwBVgK3TXZjztjWGHh+FCpy7XCWJbS6wF4xSGvP4Mfdk+RW0GiigE/WZdf2fcP EMpgeqmT5NCaGGX3E4yFbSw8tjJLgJGwrGyWLgdp06iMwWIO/N7UuajiuLxe+XNGoEyj Aj4Qy5T0L4zMcQhsPKsq5wpzaK277o9CN19BKX72SmZVPn8Q7OZC8ch+enaz/ZMZwOSl zm8CahNN89f9/y+fjpf+8rql06NcI1ikObarrLVpU5foLLtRPhTcTUSwvTBqveAKHK04 wiSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=swTYyM6pJ9tReSEgEvEfvfcDM4KepV/99+xJcUkW56I=; fh=+uLa3m5dEsZWyE738VC4UtcvjxY1kYREGLuytVVwtpk=; b=xSQfwIi2VhVtZ+UTxJUPmy6Ec4U9tG/biJMuCw56k19JiR7u8x9Llitfu6//q5aCug MPKx/QWG52g7WRvXL/+FCQWn/K1q6WfRSol9Wpq58CLC97WWIGBlvIZdKG/SF2fHlZzQ eoY3PaYHSdh6Kep1R3iswrML3N6ImUHnYls61O+SIDeOAygKUulR6in9v6HtJCfKnx51 Cd60m9r0ff20ygUsXdSBcsw2KKmPXnJJugrGokl12sIr8jYukbuw2KXxmWxuzRY6h0kn fdUAKikqA6IdL0qXJUKTuK+IamkvZM4vUrhfdAz15DsjMcE4pAWCBKSEN1G+mO6L2UsB gaFQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZUArYvTs; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id j8-20020ac85c48000000b0041b773b255bsi6218012qtj.582.2023.10.30.09.44.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 09:44:50 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZUArYvTs; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ED6BB38708B4 for ; Mon, 30 Oct 2023 15:10:58 +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.129.124]) by sourceware.org (Postfix) with ESMTPS id 8798B3858C5F for ; Mon, 30 Oct 2023 15:10:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8798B3858C5F 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 8798B3858C5F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698678634; cv=none; b=jfrL9HMZYCl1NV8M1cPgpL1kwbQACXP56Yz7oqT/qIY9ApQNP3A42fCtWEypBE7lmosNhVtzBqMboFPmpIn6N3CXbBI211MG9JZ0adI3pcdQGWsJtDcF5tuTKr0enBOPqFkLSERIV5OZJ5/vFFtDeF6hyXreB/Se4706rmsFRh0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698678634; c=relaxed/simple; bh=HIPod60/JrZTMCKIZA3H4f6fU4E9h8Hr1lgXkmHW4Fs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EFE25O7PNnLJ31/M0wV3BajdIecZ6z9O6rwUture7+C+FHvFZNo+Y6c0XeYWYuNueYBc7Sqm/T9bnEcx49pdABgRz09UJ9umGsNmc24xfQkYuUdHQdeDyxAzVfbxCAFieZEUBASXO2DbA8Po5zW0jVvBsxZB1QaA6Ch7rTcJlJQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698678633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=swTYyM6pJ9tReSEgEvEfvfcDM4KepV/99+xJcUkW56I=; b=ZUArYvTst/O1kjqQRrCDuoRz9EFGDKnlifpOPzkZyzJ4vvHFg4ckaHPmSxo9xkyrL1UGyA 9vuE6i1ai0j+wdvIABxdvrzY1cizjYyOa8Dpcg+S0c4qApbgdvhDDsluar5lRR8BDI7Cy3 x3Pz1o/Oqh41GUbHfKwzQwzuJb7rpuA= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-363-gy6acgrYNzyDEbjMxx7TZg-1; Mon, 30 Oct 2023 11:10:31 -0400 X-MC-Unique: gy6acgrYNzyDEbjMxx7TZg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6CC6C3810D27; Mon, 30 Oct 2023 15:10:31 +0000 (UTC) Received: from localhost (unknown [10.42.28.144]) by smtp.corp.redhat.com (Postfix) with ESMTP id 371792026D4C; Mon, 30 Oct 2023 15:10:31 +0000 (UTC) From: Jonathan Wakely To: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: [committed][wwwdocs] Add "Porting to GCC 14" Date: Mon, 30 Oct 2023 15:10:13 +0000 Message-ID: <20231030151030.47170-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, 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: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781199578846759763 X-GMAIL-MSGID: 1781199578846759763 Pushed to wwwdocs. -- >8 -- --- htdocs/gcc-14/porting_to.html | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 htdocs/gcc-14/porting_to.html diff --git a/htdocs/gcc-14/porting_to.html b/htdocs/gcc-14/porting_to.html new file mode 100644 index 00000000..dea9ac80 --- /dev/null +++ b/htdocs/gcc-14/porting_to.html @@ -0,0 +1,50 @@ + + + + + +Porting to GCC 14 + + + + +

Porting to GCC 14

+ +

+The GCC 14 release series differs from previous GCC releases in +a number of ways. Some of these are a result +of bug fixing, and some old behaviors have been intentionally changed +to support new standards, or relaxed in standards-conforming ways to +facilitate compilation or run-time performance. +

+ +

+Some of these changes are user visible and can cause grief when +porting to GCC 14. This document is an effort to identify common issues +and provide solutions. Let us know if you have suggestions for improvements! +

+ +

C++ language issues

+ +

Header dependency changes

+

Some C++ Standard Library headers have been changed to no longer include +other headers that were being used internally by the library. +As such, C++ programs that used standard library components without +including the right headers will no longer compile. +

+

+The following headers are used less widely in libstdc++ and may need to +be included explicitly when compiling with GCC 14: +

+
    +
  • <algorithm> + (for std::copy_n, std::lower_bound, + std::remove, std::reverse, + std::sort etc.) +
  • +
+ + + + +