A recent change to 'struct field' caused a build failure with GCC
7.5.0, as reported by Tom de Vries:
/data/vries/gdb/src/gdb/gdbtypes.h:721:51: error:
‘field::m_accessibility’ is too small to hold all values of ‘enum
class accessibility’ [-Werror]
ENUM_BITFIELD (accessibility) m_accessibility : 2;
^
Mark Wielaard pointed out that this was a GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51242
This patch works around the bug by changing several members not to be
bitfields. It reduces the size of the enum's underlying type,
instead.
I also changed m_bitsize to no longer be a bitfield -- that was done
for packing reasons in ancient times, but with m_accessibility not
being a bitfield, this no longer matters.
I removed fn_field::dummy. In earlier times it was somewhat normal in
gdb to have these dummy fields to keep track of any available padding.
However, since the advent of "ptype/o", there doesn't seem to be any
need for this.
This patch does not change the size of struct field, fn_field, or
decl_field on 64-bit hosts.