From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6766 invoked by alias); 15 Mar 2012 18:34:09 -0000 Received: (qmail 6695 invoked by uid 22791); 15 Mar 2012 18:34:08 -0000 X-SWARE-Spam-Status: No, hits=-6.4 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:33:58 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2FIXgCa020652 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 15 Mar 2012 14:33:43 -0400 Received: from greed.delorie.com (ovpn-113-63.phx2.redhat.com [10.3.113.63]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q2FIXfQt026125 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Mar 2012 14:33:42 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1]) by greed.delorie.com (8.14.4/8.14.4) with ESMTP id q2FIXeOZ003078; Thu, 15 Mar 2012 14:33:40 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.4/8.14.4/Submit) id q2FIXeOs003077; Thu, 15 Mar 2012 14:33:40 -0400 Date: Thu, 15 Mar 2012 18:34:00 -0000 Message-Id: <201203151833.q2FIXeOs003077@greed.delorie.com> From: DJ Delorie To: Tom Tromey CC: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org, binutils@sourceware.org In-reply-to: <87k42lbvco.fsf@fleche.redhat.com> (message from Tom Tromey on Thu, 15 Mar 2012 11:57:27 -0600) Subject: Re: RFA: consolidate DWARF strings into libiberty References: <87k42lbvco.fsf@fleche.redhat.com> X-IsSubscribed: yes 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/msg00560.txt.bz2 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.