This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
BYTE_BITFIELD in symtab.h
- From: Dan Nicolaescu <dann at godzilla dot ICS dot UCI dot EDU>
- To: gdb at sources dot redhat dot com
- Date: Sat, 24 Nov 2001 12:35:05 -0800
- Subject: BYTE_BITFIELD in symtab.h
Hi!
Is the following thing in symtab.h realy useful?
/* Don't do this; it means that if some .o's are compiled with GNU C
and some are not (easy to do accidentally the way we configure
things; also it is a pain to have to "make clean" every time you
want to switch compilers), then GDB dies a horrible death. */
/* GNU C supports enums that are bitfields. Some compilers don't. */
#if 0 && defined(__GNUC__) && !defined(BYTE_BITFIELD)
#define BYTE_BITFIELD :8;
#else
#define BYTE_BITFIELD /*nothing */
#endif
if BYTE_BITFIELD was defined to :8 the size of
"struct general_symbol_info" would decrease from 24 bytes to 20 bytes
for a tipical 32 bit machine.
And gdb uses quite a few of those...
Isn't the price payed for being able to switch compilers too high in
this case?
How common are compilers that don't support enum bitfields?