This is the mail archive of the
mailing list for the binutils project.
Re: RFA: consolidate DWARF strings into libiberty
- From: DJ Delorie <dj at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, gdb-patches at sourceware dot org, binutils at sourceware dot org
- Date: Thu, 15 Mar 2012 14:33:40 -0400
- Subject: Re: RFA: consolidate DWARF strings into libiberty
- References: <firstname.lastname@example.org>
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.