RFA: consolidate DWARF strings into libiberty
DJ Delorie
dj@redhat.com
Thu Mar 15 18:34:00 GMT 2012
Sigh, libiberty is supposed to be a portability library, not a
kitchen-sink for common stuff. Should I give up that premise? Or
should we consider a common dwarf2 helper library, and move even more
of the dwarf2 code into it?
> First, you'll notice that the first constant for a given enum is
> defined using a separate macro name. I couldn't think of a better
> way to avoid the "trailing ',' in an enum" warning -- one element
> must be distinguished, so I chose the first.
I typically terminate the list with a "FOO_MAX" enum, which is going
to need to be handled differently anyway.
> Also, you'll see that the names passed to the macros start with an "_".
Beware you're not violating (or causing to violate) some ISO namespace
requirement for identifiers starting with underscores.
More information about the Binutils
mailing list