This is the mail archive of the gdb-patches@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]

Re: RFA/types: Clean up use of field bitsize



> So, since I needed to gain a new field here anyway, and since I have no
> compunctions about shrinking this field a little (packed bitfields of size
> greater than a couple of words are allowed in some languages IIRC (including
> GNU C maybe?  Although they are not allowed in ISO C99), but they're
> definitely dodgy), and since signed bitfields are not portable, I cleaned up
> the construct.  It turned out to be painless except for making sure symbol
> readers initialized it, which was a little tedious.

Well, as it happens, Ada IS able to handle bit fields of arbitrary size.
However, given that you have left 29 bits (unsigned), and that the gain from
decreasing one's memory usage by 0.000006% (31 bits of 2**29) is insignificant
compared to the enormous cost of extracting 2**29-bit, arbitrarily aligned
fields, I'd say that this change is reasonable (:->).

P. Hilfinger
Ada Core Technologies, Inc.


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