From patchwork Fri Jul 22 09:47:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 123 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f503:0:0:0:0:0 with SMTP id q3csp153177wro; Fri, 22 Jul 2022 02:48:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uNzjW9HzjOBjEIHyOFUYWN+MCBgkN/OCXScF45g6l94LC+Hz3LynNwJS1/oguB9l2X5lFw X-Received: by 2002:a17:907:2cf3:b0:72b:8ac1:a21f with SMTP id hz19-20020a1709072cf300b0072b8ac1a21fmr2450825ejc.291.1658483300194; Fri, 22 Jul 2022 02:48:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658483300; cv=none; d=google.com; s=arc-20160816; b=b8B193y1FLR6QZsip7iwWObjPcIsWCqboRVM4qGRnKjSjB7kRbEmRnBJhsNFj4U1pQ FA4Fb5pmjy7e2DvBevuw6Sf8lwvSbgk/CfpHP0vIs2FKC/4MfY3KLWl5Aj6aoyi80y+o EJFc5+9cSom3Hny3QoVfK0vrEd14wbxVnMMD3otiCZOCeFJgkIulzIVgjZSJwkdriNiT cK0pvbh7RvPwi1AQkomRmwqBmqXtzSGoBCrX7Lbw40z6XVSlgmTdUhQmZd2j9n+bzPrb K3Jf4pjg1XzgzqtChh+U5IsdHsolo3af9Kt/uwgkutr4lGdx6fQveey4GHpq6U973bVj K4dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:from:to :content-language:user-agent:mime-version:date:message-id :ironport-sdr:dmarc-filter:delivered-to; bh=qOs1klD41DzKn+hLn9X0nhBvl/Jf+HHfo0k3scyXFMw=; b=E//1hsBdXBQ1zfqHyGeFfdEoViq20QHsr4+i6uE6kNwRSDbquEz8+tfIvzuFZbmFQ0 blFtnXFz+S6b6BtBTk03lBIrXm+a3rGmmcnDZWuqALh8vmra44STnWvajBMLKjTX5uia hdE4k/v+vurP3kf0KRqouYtU4pzEJGpYVgtzJd+LN3Da287fz2C7xsB8JtPflpoXWScQ nqAcWuj89T8xXYPOqzy6cqaDsCwYa6YUonbkyKO/REh+Nkbey04BjOraPxoQvD6ZGJ5u /qjo9FHur3h9YKma9tZzM244+poJmRQCwsVaKBwsUwKkBdcETPkpDLTWKIhHD8+KQJIb Z0wQ== ARC-Authentication-Results: i=1; mx.google.com; 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" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id en14-20020a056402528e00b0043bcd208affsi1939509edb.425.2022.07.22.02.48.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 02:48:20 -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; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 40A443834E4F for ; Fri, 22 Jul 2022 09:48:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id EFE4F3857C5D for ; Fri, 22 Jul 2022 09:47:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EFE4F3857C5D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.93,185,1654588800"; d="diff'?scan'208";a="82844975" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 22 Jul 2022 01:47:47 -0800 IronPort-SDR: ryelJUYANS5Rajk6v5L5xQgtEDV+wGnmue3/SsUV8goAxpn8PzLW4/pySwosT0q26sw/p2OGKW CCiz9qrjDiStZnxIMdqo5kWw47x7uCQpOBb1edaDgQ0M5GDEwoAb1c5AvjRk+s2eNeW0hKDoyW JqCT9gpftmOkkIec35AqSC9r4YXFVlmnOB59XJtwykR4pVZ7xJyZzy76DVowqT07X0Bb+utfMC Yp7DDg4sucTnp1EgpgCMyigJMARogp3mQeNDPftND3pEQlT5iEOw4r7tshi8SymR2D/DIaKTht /34= Message-ID: <20aab88c-3970-1ac8-92c2-cc2e03e8296e@codesourcery.com> Date: Fri, 22 Jul 2022 11:47:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: Jakub Jelinek , gcc-patches From: Tobias Burnus Subject: [patch] libgomp/splay-tree.h: Fix splay_tree_prefix handling X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, 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.29 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 Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1739045784621222874?= X-GMAIL-MSGID: =?utf-8?q?1739045784621222874?= As is, it is only a cleanup/consistency patch. However, I did run into this issue when working on the reverse-offload implementation (to handle reverse lookups of vars and functions). OK for mainline? Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 libgomp/splay-tree.h: Fix splay_tree_prefix handling When splay_tree_prefix is defined, the .h file defines splay_* macros to add the prefix. However, before those were only unset when additionally splay_tree_c was defined. Additionally, for consistency undefine splay_tree_c also when no splay_tree_prefix is defined - there is no interdependence either. libgomp/ChangeLog: * splay-tree.h: Fix splay_* macro unsetting if splay_tree_prefix is defined. libgomp/splay-tree.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/libgomp/splay-tree.h b/libgomp/splay-tree.h index 8d66dfb51e0..992381c4000 100644 --- a/libgomp/splay-tree.h +++ b/libgomp/splay-tree.h @@ -107,24 +107,24 @@ extern void splay_tree_foreach (splay_tree, splay_tree_callback, void *); #else /* splay_tree_c */ # ifdef splay_tree_prefix # include "splay-tree.c" -# undef splay_tree_name_1 -# undef splay_tree_name -# undef splay_tree_node_s -# undef splay_tree_s -# undef splay_tree_key_s -# undef splay_tree_node -# undef splay_tree -# undef splay_tree_key -# undef splay_compare -# undef splay_tree_lookup -# undef splay_tree_insert -# undef splay_tree_remove -# undef splay_tree_foreach -# undef splay_tree_callback -# undef splay_tree_c # endif +# undef splay_tree_c #endif /* #ifndef splay_tree_c */ #ifdef splay_tree_prefix +# undef splay_tree_name_1 +# undef splay_tree_name +# undef splay_tree_node_s +# undef splay_tree_s +# undef splay_tree_key_s +# undef splay_tree_node +# undef splay_tree +# undef splay_tree_key +# undef splay_compare +# undef splay_tree_lookup +# undef splay_tree_insert +# undef splay_tree_remove +# undef splay_tree_foreach +# undef splay_tree_callback # undef splay_tree_prefix #endif