From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30304 invoked by alias); 26 Nov 2002 23:57:38 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 30172 invoked from network); 26 Nov 2002 23:57:37 -0000 Received: from unknown (HELO mta06ps.bigpond.com) (144.135.25.138) by sources.redhat.com with SMTP; 26 Nov 2002 23:57:37 -0000 Received: from bubble.local ([144.135.25.81]) by mta06ps.bigpond.com (Netscape Messaging Server 4.15 mta06ps May 23 2002 23:53:28) with SMTP id H67JVZ00.80T for ; Wed, 27 Nov 2002 09:57:35 +1000 Received: from CPE-144-136-184-243.sa.bigpond.net.au ([144.136.184.243]) by psmam05.mailsvc.email.bigpond.com(MailRouter V3.0n 107/9069865); 27 Nov 2002 09:57:34 Received: (qmail 9663 invoked by uid 179); 26 Nov 2002 23:57:33 -0000 Date: Tue, 26 Nov 2002 15:57:00 -0000 From: Alan Modra To: ac131313@redhat.com, klee@apple.com, binutils@sources.redhat.com, gdb@sources.redhat.com Subject: Re: [RFA] Replace strdup with xstrdup in tic30-dis.c Message-ID: <20021126235733.GX949@bubble.sa.bigpond.net.au> Mail-Followup-To: ac131313@redhat.com, klee@apple.com, binutils@sources.redhat.com, gdb@sources.redhat.com References: <4D2AFB6A-FD1E-11D6-B723-00039396EEB8@apple.com> <3DE3EFC4.2010209@redhat.com> <20021126223746.GQ949@bubble.sa.bigpond.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-SW-Source: 2002-11/txt/msg00377.txt.bz2 On Tue, Nov 26, 2002 at 03:29:36PM -0800, Ian Lance Taylor wrote: > Alan Modra writes: > > > Hmm, I'm inclined to just use "int" directly rather than introduce a > > "bfd_boolean". Unless I hear objections, that's what I'll do one of > > these days.. > > I tend to think that bfd_boolean is better because it makes the code > slightly more self-documenting. An int variable might hold any value, > but a bfd_boolean variable is clearly intended to hold only a true or > false value. Yes, I agree that it's more self-documenting, but even better is to use function names that are obviously predicates. My reason for disliking the typedef is that it hides the real type in the same way that macros hide things. When it comes to debugging code you inevitably hit a situation where you need to ignore all the documentation and look at all macros and typedefs to see what is really going on. > But I'm hardly fanatical about it. Nor am I. :) So far, it's two people for "bfd_boolean", one for "int". -- Alan Modra IBM OzLabs - Linux Technology Centre