From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2371 invoked by alias); 15 Mar 2012 18:42:25 -0000 Received: (qmail 2351 invoked by uid 22791); 15 Mar 2012 18:42:24 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Mar 2012 18:42:11 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2FIfuw4023003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 15 Mar 2012 14:41:56 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2FIfsJ1000557 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 15 Mar 2012 14:41:55 -0400 From: Tom Tromey To: DJ Delorie Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: RFA: consolidate DWARF strings into libiberty References: <87k42lbvco.fsf@fleche.redhat.com> <201203151833.q2FIXeOs003077__40387.7084645957$1331836457$gmane$org@greed.delorie.com> Date: Thu, 15 Mar 2012 18:42:00 -0000 In-Reply-To: <201203151833.q2FIXeOs003077__40387.7084645957$1331836457$gmane$org@greed.delorie.com> (DJ Delorie's message of "Thu, 15 Mar 2012 14:33:40 -0400") Message-ID: <87d38dbtal.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00564.txt.bz2 >>>>> "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. Tom