public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Remove NR_DOMAINS
@ 2024-01-28 23:43 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-01-28 23:43 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0ff2d66b1f1f3125ff59a97539b97a61bc0d6bf3
commit 0ff2d66b1f1f3125ff59a97539b97a61bc0d6bf3
Author: Tom Tromey <tom@tromey.com>
Date: Thu Mar 2 15:08:42 2023 -0700
Remove NR_DOMAINS
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’
Diff:
---
gdb/symtab.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 729c003f1c1..6b5b087e99a 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -922,15 +922,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
-static_assert (NR_DOMAINS <= (1 << SYMBOL_DOMAIN_BITS));
extern const char *domain_name (domain_enum);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-28 23:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-28 23:43 [binutils-gdb] Remove NR_DOMAINS Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).