diff options
author | Tom Tromey <tom@tromey.com> | 2023-03-02 15:08:42 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-01-28 10:58:16 -0700 |
commit | 0ff2d66b1f1f3125ff59a97539b97a61bc0d6bf3 (patch) | |
tree | 8749f7c1a03b97a0839c0661edbcc9cb4370bdcd | |
parent | 790948cb0933c835e76ada717ab857852813e04f (diff) | |
download | gdb-0ff2d66b1f1f3125ff59a97539b97a61bc0d6bf3.zip gdb-0ff2d66b1f1f3125ff59a97539b97a61bc0d6bf3.tar.gz gdb-0ff2d66b1f1f3125ff59a97539b97a61bc0d6bf3.tar.bz2 |
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’
-rw-r--r-- | gdb/symtab.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 729c003..6b5b087 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); |