This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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? 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]