This is the mail archive of the mailing list for the binutils 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: consolidate DWARF strings into libiberty

>>>>> "DJ" == DJ Delorie <> writes:

DJ> Sigh, libiberty is supposed to be a portability library, not a
DJ> kitchen-sink for common stuff.  Should I give up that premise?  Or
DJ> should we consider a common dwarf2 helper library, and move even more
DJ> of the dwarf2 code into it?

My reasoning was:

I would have put it somewhere else, but there is nowhere else to put it.
Making a new library for this one file seemed like overkill.
Finally, there is already stuff in libiberty not related to
portability.  E.g., hashtab or the demangler.

Tom> First, you'll notice that the first constant for a given enum is
Tom> defined using a separate macro name.  I couldn't think of a better
Tom> way to avoid the "trailing ',' in an enum" warning -- one element
Tom> must be distinguished, so I chose the first.

DJ> I typically terminate the list with a "FOO_MAX" enum, which is going
DJ> to need to be handled differently anyway.

I usually do that to, but I wanted this change not to affect the
contents of the defined enums.

Tom> Also, you'll see that the names passed to the macros start with an "_".

DJ> Beware you're not violating (or causing to violate) some ISO namespace
DJ> requirement for identifiers starting with underscores.

Yeah, I didn't consider that.

I guess I can just put the whole DW_TAG_ prefix in there.
That isn't a big deal.  Or if you have some other suggestion, I can
implement it.


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