From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14089 invoked by alias); 13 Nov 2002 18:59:47 -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 14082 invoked from network); 13 Nov 2002 18:59:44 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 13 Nov 2002 18:59:44 -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 gADIaUw20499 for ; Wed, 13 Nov 2002 13:36:30 -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 gADIxfx25897; Wed, 13 Nov 2002 13:59:42 -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 gADIxfH09956; Wed, 13 Nov 2002 10:59:41 -0800 Message-ID: <3DD2A11D.59454712@redhat.com> Date: Wed, 13 Nov 2002 10:59: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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-11/txt/msg00382.txt.bz2 Andrew Cagney wrote: > > > Currently, thirteen files which provide a target_ops explicitly initialize > > members they don't support to NULL. I plan to delete a number of these > > methods, and rather than making sure I got all the necessary target files > > each time I just wanted to delete the unnecessary lines up-front. All of > > these are called-once functions initializing a statically or globally > > declared object; C will guarantee zero-initialization for us. And several > > of the functions explicitly called memset anyway. > > > > Besides, this way grepping for .to_require_attach\ = will only find targets > > which define it to something useful. > > > > I'll commit this tomorrow unless someone sees a problem with it. > > > > Note1: remote-st.c hasn't been compilable in a while; m68*-tandem-* is > > probably a good candidate for the hitlist. From a glance it looks like it > > has been broken since the HP merge added the NULL assignments I'm removing, > > which is about three years now I think. > > > > Note2: The DONT_USE member of struct target_ops can go now. > > 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.