From patchwork Tue Nov 21 03:53:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 80395 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 7D98E385840B for ; Tue, 21 Nov 2023 03:54:08 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id C88D73858CD1 for ; Tue, 21 Nov 2023 03:53:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C88D73858CD1 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 C88D73858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700538803; cv=none; b=xwkYzWy5HSGwSCuo1d1v3xe6TyLpqEzc/bDHlWZQF7LC+po37ZcuE5wQHVHJn8Qgxuko4KC1GrC+1zXiucBZp25jkcD26qhwkRwPDCiZWrQiv+kuuuAC/5klEMwLigkXQU7ssgPqypgbSx81I7KZl7lVo0jwQN2XK79jk4g2eWA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700538803; c=relaxed/simple; bh=lTwt4TRThKGWaYyF2xSS3HHunSH5xJ7WAfgT1xlQTCQ=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=Qer+kRXva3to1LNnlUnKHhqoyCXj/NOYvcqWRnMy5bKvlq262FTguOoHU6n/3y5hP/Avjsaofr8Q6o0EOb+lebJ5nRoim5ZwjeDSDK+K4ODTvhZLvFhmqfXCu9UE7pVBFmIJQ8FbHvST67AQc7QXubFHbfuqkg53bXFaWY3aMPQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6010a.ext.cloudfilter.net ([10.0.30.248]) by cmsmtp with ESMTPS id 5C7SrnOYzWcCI5HpArZVLL; Tue, 21 Nov 2023 03:53:20 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 5Hp9rSMJN8vT05Hp9rMCxD; Tue, 21 Nov 2023 03:53:19 +0000 X-Authority-Analysis: v=2.4 cv=ffi+dmcF c=1 sm=1 tr=0 ts=655c29af a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=BNY50KLci1gA:10 a=Qbun_eYptAEA:10 a=j2nSuGdwE-VHdcfjFbAA:9 a=QEXdDO2ut3YA:10 a=ZXulRonScM0A:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Qm2+Kcf75Hn3tn2MclzAEf3tD0pwcpxo1CcerF0iq4g=; b=rIUVjvKlisai5/3ynabsD369cO HARRthq1idnBYv9QJNmWQFzY8Fq5+cVKPMpQI1il1uISZxtOK4FczesUr15rl6XIfHCXhQj9cmwFa 7KNfO6+C6KpiysTJY7DSi/NFv; Received: from 97-122-77-73.hlrn.qwest.net ([97.122.77.73]:47856 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1r5Hp9-0040be-0S for gdb-patches@sourceware.org; Mon, 20 Nov 2023 20:53:19 -0700 From: Tom Tromey Date: Mon, 20 Nov 2023 20:53:37 -0700 Subject: [PATCH 06/29] Remove NR_DOMAINS MIME-Version: 1.0 Message-Id: <20231120-submit-domain-hacks-2-v1-6-29650d01b198@tromey.com> References: <20231120-submit-domain-hacks-2-v1-0-29650d01b198@tromey.com> In-Reply-To: <20231120-submit-domain-hacks-2-v1-0-29650d01b198@tromey.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.4 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.77.73 X-Source-L: No X-Exim-ID: 1r5Hp9-0040be-0S X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-77-73.hlrn.qwest.net ([192.168.0.21]) [97.122.77.73]:47856 X-Source-Auth: tom+tromey.com X-Email-Count: 7 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfJQT0U4fZia3XKdM7CeA0PKFRbaNXZorFrPUKwe4oCorCLtWMVBfwg7wigCMow5XS+/93UR2jnDhLzugH+zF8dHUcr2eQPPwkGY6XQ5/oPuGUG2fCiQq Z95jLXSKxW8pva8xXrsHmDq1DUc+IqV6VCJDIKhfMFExoHTOxhiyNDT0NEKfa/JBLSfZHRj+Qiz1fWlNVJ6IDhEqkLnB9qQHKGk= X-Spam-Status: No, score=-3023.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, 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: 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 NR_DOMAINS is only used for a static assert, but we no longer need it now. If we add too many constants to this enum, GCC will warn about the bitfield overflow: error: ‘symbol::m_domain’ is too small to hold all values of ‘enum domain_enum’ --- gdb/symtab.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gdb/symtab.h b/gdb/symtab.h index 8dfc873b1c9..21c84cbe006 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -916,15 +916,11 @@ enum domain_enum /* Fortran common blocks. Their naming must be separate from VAR_DOMAIN. They also always use LOC_COMMON_BLOCK. */ COMMON_BLOCK_DOMAIN, - - /* This must remain last. */ - NR_DOMAINS }; /* The number of bits in a symbol used to represent the domain. */ #define SYMBOL_DOMAIN_BITS 3 -gdb_static_assert (NR_DOMAINS <= (1 << SYMBOL_DOMAIN_BITS)); extern const char *domain_name (domain_enum);