From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17674 invoked by alias); 13 Nov 2002 19:50:30 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 17616 invoked from network); 13 Nov 2002 19:50:30 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 13 Nov 2002 19:50:30 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id gADJRGw03847 for ; Wed, 13 Nov 2002 14:27:16 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gADJoSx26789; Wed, 13 Nov 2002 14:50:28 -0500 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id gADJoRH11994; Wed, 13 Nov 2002 11:50:27 -0800 Message-ID: <3DD2AD03.49A0CC23@redhat.com> Date: Wed, 13 Nov 2002 11:50:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Andrew Cagney CC: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: PATCH: Remove unnecessary zero-initializations References: <20021111001910.GA17944@nevyn.them.org> <3DCF2D6E.2030407@redhat.com> <3DD2A11D.59454712@redhat.com> <3DD2A8D1.5020902@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-11/txt/msg00390.txt.bz2 Andrew Cagney wrote: > > > The fact that 13 files were doing it should suggest that it was > >> intentional. Might want to wait a bit longer while someone dregs up the > >> history. > > > > > > Not necessarily. At one time it was required. Then someone > > (either Stan Shebs or John Metzler, I forget) revamped the way > > target vectors are created, so that it is no longer required. > > These may either be legacy, or someone doing the initialization > > from habit. In any case, it's definitely not required now. > > I know it was John Metzler but I don't have the details of what exactly > he did. Do you? As I recall, the old method was to malloc the vector and then explicitly initialize all the members. The new one was to statically allocate it, so that only the non-zero members had to be initialized. This was done so that adding new members would be less painful.