From patchwork Wed Sep 29 08:15:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 45542 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 895C1385800F for ; Wed, 29 Sep 2021 08:15:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 895C1385800F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1632903351; bh=QI3NJXjImaPgY1EpGyZIoj6TjYN66nCmDywdFzmWRqU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=Yc15p53H6UYPUElZnR+Dki8taLcSPSCHG0xUQplyoYdDvrcoo2S0m3rpT+96Bierb adQvUwVYU9YCfGw3+Yv3WS1moAYWUhkIVbP3oJGdImGgr3iLU8/lXmUiOY6i8+ZT1T YEt8LEsheZ2w/cur0/R/Ppgh8Hd/Dvi6sgqmCMEI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by sourceware.org (Postfix) with ESMTPS id D5CC03858D35 for ; Wed, 29 Sep 2021 08:15:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D5CC03858D35 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18T7JmZN012532 for ; Wed, 29 Sep 2021 01:15:19 -0700 Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3bcknk86gs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 29 Sep 2021 01:15:19 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 29 Sep 2021 01:15:18 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Wed, 29 Sep 2021 01:15:18 -0700 Received: from linux.wrightpinski.org.com (unknown [10.69.242.197]) by maili.marvell.com (Postfix) with ESMTP id 48DB33F7068; Wed, 29 Sep 2021 01:15:18 -0700 (PDT) To: Subject: [PATCH] [www] Add note about computed gotos to changes and porting guide Date: Wed, 29 Sep 2021 01:15:14 -0700 Message-ID: <1632903314-23720-1-git-send-email-apinski@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Proofpoint-GUID: iL4Trju6gu6-6m_5Z6RCffR96OdYuwmC X-Proofpoint-ORIG-GUID: iL4Trju6gu6-6m_5Z6RCffR96OdYuwmC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-29_02,2021-09-28_01,2020-04-07_01 X-Spam-Status: No, score=-14.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: apinski--- via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: apinski@marvell.com Cc: Andrew Pinski Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Andrew Pinski Even though there is not many computed gotos in the wild and even less that would use an integer type, it would still be a good idea to add this new error message to both changes and the porting to guide. OK? --- htdocs/gcc-12/changes.html | 6 ++-- htdocs/gcc-12/porting_to.html | 66 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 htdocs/gcc-12/porting_to.html diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 1f156a9..3130710 100644 --- a/htdocs/gcc-12/changes.html +++ b/htdocs/gcc-12/changes.html @@ -17,11 +17,9 @@

This page is a "brief" summary of some of the huge number of improvements in GCC 12. -

Note: GCC 12 has not been released yet, so this document is @@ -31,6 +29,10 @@ a work-in-progress.

Caveats

  • + C: + Computed gotos require a pointer type now. +
  • +
  • C++: Two non-standard std::pair constructors have been deprecated. These allowed the use of an rvalue and a literal 0 to diff --git a/htdocs/gcc-12/porting_to.html b/htdocs/gcc-12/porting_to.html new file mode 100644 index 0000000..9154d7b --- /dev/null +++ b/htdocs/gcc-12/porting_to.html @@ -0,0 +1,66 @@ + + + + + +Porting to GCC 12 + + + + +

    Porting to GCC 12

    + +

    +The GCC 12 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 12. This document is an effort to identify common issues +and provide solutions. Let us know if you have suggestions for improvements! +

    + + + +

    C language issues

    + +

    Computed goto now require a pointer type

    + +

    +In GCC 12, computed gotos require a pointer type. +An example which was accepted before:

    +
    
    +  void f(void)
    +  {
    +    goto *10;
    +  }
    +
    +is no longer accepted and you need to add a cast to it like: + +
    
    +  void f(void)
    +  {
    +    goto *(void*)10;
    +  }
    +
    + + + + + + + + +