This is the mail archive of the binutils@sourceware.org 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


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.


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