From patchwork Fri Jun 30 05:20:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kewen.Lin" X-Patchwork-Id: 114560 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp10114780vqr; Thu, 29 Jun 2023 22:21:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlHJYAYts6zvR8hkWewp+3Bqi4VTXiOFMxsHnszZMRBHm+VkAD6QLgR85PSD0zlLJW2RdEMe X-Received: by 2002:a17:906:85d3:b0:992:d337:6e44 with SMTP id i19-20020a17090685d300b00992d3376e44mr1035050ejy.58.1688102499870; Thu, 29 Jun 2023 22:21:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688102499; cv=none; d=google.com; s=arc-20160816; b=BUBP/KXI1sm6heRqOGo3VkhUpsx7pOyFMKetlG1tZX/I/v+4qBQwoFevSwnyr878pJ 8nS8XADhVh3sweVncWoTuz6GSVx9dcSbZaUynW3ZPFlSp2tNXHJhzBL12sH4/A8iLDuL 3GRIjD61xlB3fetDRpPbqG6Wtkb6FcKMHiDR/H6lE4ClRyzyHHhH7I9fAIa84gTdyaIG 5Gx/5j9I/pTFSz+W0aKVJ9/rd8ux5b33i52SH2enO6gjUtCkFslfjvKAOAxGcS4KTcUq PJne+F0Mhb4orpj7wbMTWriVPjerAEqYdZORLhsEOi5p3+PVycUycHHonwceuYheN3wu FBEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:subject:cc:to:content-language:user-agent :mime-version:date:message-id:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=b7OVuXW9F4fLKW01Tzna9PDQRlWjf4UwA0q9VSdtPVk=; fh=RWkucmpcFCID6uRRkFL+nx4qIFX7z8D/AmuVp5JdvAA=; b=Xy6iATJNVVsdGcxgUivQtXIR13nqqWsVv1DG5CJMonS/b0siBiFlLJmx6wT0ccMzX1 JFPbWuX3vRnDbnDw6A1hYdOeeP5A2pNwtfpSgmmS+o0u1psocgSTYaXAUo/mYcA+cL6x 25O23xKybG+p8sXMbj7W4OeKlRi4K/6GK68GFBe04VswWKcshY5OA8qGhcMqa+tT6wHL 2v7LxX3gZtdjSuybxX4bZHJP/hg8/6ftJz6pBwseQGKs2EqBCp3hpSgYIl2KfI4+ig5O CSFeptokiqMdIjCI9elv8l6f+h1eYnPFikOAGtMrQOEJyWdKu8wTkU7YFynzw70zsHP6 l7kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=jYRbXafQ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id re9-20020a170906d8c900b00992b66e2b20si1479845ejb.523.2023.06.29.22.21.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 22:21:39 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=jYRbXafQ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8FC5E3857701 for ; Fri, 30 Jun 2023 05:21:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FC5E3857701 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688102498; bh=b7OVuXW9F4fLKW01Tzna9PDQRlWjf4UwA0q9VSdtPVk=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=jYRbXafQcz/0z5YhqVgPUkwaX0pTu+jNhdVrKe8R1rUBOPIkTi79yJZU2hoLb7YDB ZVU9XVT+LkJ4FyJx155Xf0JX7HGG3u/X0hw6Pco6o08IDrz2LIeFXpUPiLxQLhRJF9 lYfJN4UXTfcZ9TOaSn5hp/hVuzA8AhVxmszPJBBA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 9FC3D3858D39 for ; Fri, 30 Jun 2023 05:20:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9FC3D3858D39 Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35U5HHFg007263; Fri, 30 Jun 2023 05:20:51 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rhrs1r2bk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Jun 2023 05:20:51 +0000 Received: from m0360083.ppops.net (m0360083.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 35U5HN9S007547; Fri, 30 Jun 2023 05:20:50 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rhrs1r2aw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Jun 2023 05:20:50 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 35U3T8CY017465; Fri, 30 Jun 2023 05:20:48 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma05fra.de.ibm.com (PPS) with ESMTPS id 3rdr45awwe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Jun 2023 05:20:48 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 35U5Kj7o39190830 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Jun 2023 05:20:46 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D8BF42004D; Fri, 30 Jun 2023 05:20:45 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8DDFE20043; Fri, 30 Jun 2023 05:20:44 +0000 (GMT) Received: from [9.200.56.250] (unknown [9.200.56.250]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 30 Jun 2023 05:20:44 +0000 (GMT) Message-ID: <743141ec-624e-0cab-f30e-54765c3c6b05@linux.ibm.com> Date: Fri, 30 Jun 2023 13:20:42 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: en-US To: GCC Patches Cc: Richard Sandiford , Richard Biener Subject: [PATCH] tree.h: Hide wi::from_mpz from GENERATOR_FILE X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 6vbCBfiyqofw8htqJNi2nCO-kh7gZp6w X-Proofpoint-GUID: 6oWHeNMfZEKZGoXhJRjyFgddqQOJmQ-3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-30_02,2023-06-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 mlxlogscore=999 priorityscore=1501 impostorscore=0 phishscore=0 lowpriorityscore=0 suspectscore=0 clxscore=1015 spamscore=0 adultscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306300043 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "Kewen.Lin via Gcc-patches" From: "Kewen.Lin" Reply-To: "Kewen.Lin" Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770103766972509367?= X-GMAIL-MSGID: =?utf-8?q?1770103766972509367?= Hi, Similar to r0-85707-g34917a102a4e0c for PR35051, the uses of mpz_t should be guarded with "#ifndef GENERATOR_FILE". This patch is to fix it and avoid some possible build errors. Bootstrapped and regress-tested on x86_64-redhat-linux, and powerpc64{,le}-linux-gnu. And cross-build well on power for 40+ different ports. Is it ok for trunk? gcc/ChangeLog: * tree.h (wi::from_mpz): Hide from GENERATOR_FILE. --- gcc/tree.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.39.3 diff --git a/gcc/tree.h b/gcc/tree.h index 1854fe4a7d4..7e92a12f9cb 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -6460,7 +6460,9 @@ namespace wi wide_int min_value (const_tree); wide_int max_value (const_tree); +#ifndef GENERATOR_FILE wide_int from_mpz (const_tree, mpz_t, bool); +#endif } template