From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7741 invoked by alias); 18 Dec 2001 01:44:08 -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 7664 invoked from network); 18 Dec 2001 01:44:05 -0000 Received: from unknown (HELO oflmta02bw.bigpond.com) (139.134.6.23) by sources.redhat.com with SMTP; 18 Dec 2001 01:44:05 -0000 Received: from bubble.local ([144.135.24.72]) by oflmta02bw.bigpond.com (Netscape Messaging Server 4.15) with SMTP id GOINSV00.IF7 for ; Tue, 18 Dec 2001 11:50:55 +1000 Received: from CPE-144-136-176-14.sa.bigpond.net.au ([144.136.176.14]) by bwmam02.mailsvc.email.bigpond.com(MailRouter V3.0f 17/132349); 18 Dec 2001 11:44:02 Received: (qmail 4948 invoked by uid 179); 18 Dec 2001 01:44:02 -0000 Date: Mon, 17 Dec 2001 17:44:00 -0000 From: Alan Modra To: Richard Henderson Cc: Andrew Cagney , Ian Lance Taylor , binutils@sources.redhat.com, gdb@sources.redhat.com Subject: Re: enum { BFD_ENDIAN_BIG, ...} Message-ID: <20011218121402.S29130@bubble.sa.bigpond.net.au> Mail-Followup-To: Richard Henderson , Andrew Cagney , Ian Lance Taylor , binutils@sources.redhat.com, gdb@sources.redhat.com References: <3C1D4919.1000102@cygnus.com> <3C1E0F79.6050209@cygnus.com> <20011218105941.Q29130@bubble.sa.bigpond.net.au> <20011217164521.C15826@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.17i In-Reply-To: <20011217164521.C15826@redhat.com>; from rth@redhat.com on Mon, Dec 17, 2001 at 04:45:21PM -0800 X-SW-Source: 2001-12/txt/msg00157.txt.bz2 On Mon, Dec 17, 2001 at 04:45:21PM -0800, Richard Henderson wrote: > On Tue, Dec 18, 2001 at 10:59:41AM +1030, Alan Modra wrote: > > While we're on this subject, note that initialising pointers (and FP) to > > all-bits-zero via memset is not strictly portable. Not all architectures > > represent a NULL pointer as all-bits-zero. The C-FAQ mentions a number > > of such machines. http://www.eskimo.com/~scs/C-faq/top.html > > Whatever. None of them are live. Heh. I suppose I should have admitted noticing this strict portabilty problem at various times, and couldn't be bothered fixing occurrences. The thing is, a number of places in binutils do memset (structp, 0, sizeof (*structp); structp->ptr1 = NULL; structp->ptr2 = NULL; . . as if at some stage binutils authors were concerned about this portability issue. Typically, not _all_ pointers in the struct are set to NULL, likely due to bitrot. That's mildly confusing, and should probably be fixed. My inclination is to remove such "unnecessary" initialisation. Alan