From patchwork Thu Mar 13 20:28:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 107855 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 6580B3857C7F for ; Thu, 13 Mar 2025 20:29:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6580B3857C7F Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=KzuTXnJW X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) by sourceware.org (Postfix) with ESMTPS id 4C7E43858C48 for ; Thu, 13 Mar 2025 20:29:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4C7E43858C48 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4C7E43858C48 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741897746; cv=none; b=NNUj792IauL1yHSfF1AoN3m7qrxoZBL6a7UY2PiUu5JJYY0BUukmk/gioOo9Njm5t83vESaoAxAVkuL7boVKEfyBSHhYgOwJCBEhjPQvbd/1IL0NjAt/yjnJGfRmuW0M2OfkhF+w4oF3ai083Ee4PnOZUjOuPdip6B2INTuqNNI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741897746; c=relaxed/simple; bh=0cRkxaNSIemLxwBlPS16iu4tNLg0qOOUWTiEzCl9SfQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=O7vAChgWTrEmeRzetqf6N1bkvW5JLbPNoCbAC7zlD+2b8nu5HYWovZuhPUvjcuGJohVX07uEu/HXlycPWvliCMXfDOVZ00GE14VNoCjXLzBiuhDzFReF2CLXkrvZcaFyJ2C3awa5SNoJ/93yWp2cSmyJF7rhDupwuu853HV+zko= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C7E43858C48 Received: from eig-obgw-5009a.ext.cloudfilter.net ([10.0.29.176]) by cmsmtp with ESMTPS id saobtYF5xWuHKspAvtJLcf; Thu, 13 Mar 2025 20:29:05 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id spAutRqiiNrTjspAutTXeY; Thu, 13 Mar 2025 20:29:05 +0000 X-Authority-Analysis: v=2.4 cv=WPt5XGsR c=1 sm=1 tr=0 ts=67d34011 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=Vs1iUdzkB0EA:10 a=ItBw4LHWJt0A:10 a=JPw4OKpxRKaUkvYC99YA:9 a=6Ogn3jAGHLSNbaov7Orx:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=B885/ojwl+B/Ky3SAmMcQHcIWiCbVgMe+8fzCMDBKho=; b=KzuTXnJWqDUssPpreVun+wMlDd jXXfiA4L1ATB3/CHYmYsBBgnHCd/Wq9ek0V54AG7Rli34tK4qMBkXkq8JUns/v3CVuwvRHs15cdSA qjJUrNSHo5lkSE9KqJADpOyjl; Received: from 97-122-96-32.hlrn.qwest.net ([97.122.96.32]:39146 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1tspAu-00000000KwR-08y8; Thu, 13 Mar 2025 14:29:04 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Remove std::hash specialization Date: Thu, 13 Mar 2025 14:28:53 -0600 Message-ID: <20250313202853.2769260-1-tom@tromey.com> X-Mailer: git-send-email 2.46.1 MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.96.32 X-Source-L: No X-Exim-ID: 1tspAu-00000000KwR-08y8 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-96-32.hlrn.qwest.net (localhost.localdomain) [97.122.96.32]:39146 X-Source-Auth: tom+tromey.com X-Email-Count: 6 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfE4qedWHDU9dZLKEBo9hNhJCNfb3meigpRh+8eWEelaMrZ0n3oMoP8sETeuL4B+z5NVJr80oauaNGHpz0j9KBRC/CgoeKVMcoH66c1YbjUB5Jej8W8QW Y/1TfvvGBqShZWFjUFj8KGegLwtWJEB/S1h7Ea0Wa+Y3LFHhQ27l6xeSOvnxqhFCs9wpO161BZytWjwX8OV8ehOMtM/qdeBRRTk= X-Spam-Status: No, score=-3016.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org C++11 initially omitted specialization of std::hash for enumeration types, but this was rectified in LWG issue 2148. This patch removes a redundant specialization. Tested by rebuilding. --- gdb/dictionary.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/gdb/dictionary.c b/gdb/dictionary.c index 6925ad4d46c..f617b8f967f 100644 --- a/gdb/dictionary.c +++ b/gdb/dictionary.c @@ -915,23 +915,6 @@ struct multidictionary unsigned short n_allocated_dictionaries; }; -/* A hasher for enum language. Injecting this into std is a convenience - when using unordered_map with C++11. */ - -namespace std -{ - template<> struct hash - { - typedef enum language argument_type; - typedef std::size_t result_type; - - result_type operator() (const argument_type &l) const noexcept - { - return static_cast (l); - } - }; -} /* namespace std */ - /* A helper function to collate symbols on the pending list by language. */ static std::unordered_map>