From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19384 invoked by alias); 13 Nov 2002 19:04:19 -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 19376 invoked from network); 13 Nov 2002 19:04:18 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 13 Nov 2002 19:04:18 -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 gADIf5w22698 for ; Wed, 13 Nov 2002 13:41:05 -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 gADJ4Gx25988; Wed, 13 Nov 2002 14:04:16 -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 gADJ4GH10281; Wed, 13 Nov 2002 11:04:16 -0800 Message-ID: <3DD2A230.5A2935EC@redhat.com> Date: Wed, 13 Nov 2002 11:04:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Felix Lee , gdb-patches@sources.redhat.com Subject: Re: PATCH: Remove unnecessary zero-initializations References: <200211112116.gABLGeB03251@paper-wolf-solo.tigerfood.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-11/txt/msg00384.txt.bz2 Felix Lee wrote: > > Daniel Jacobowitz : > > Certainly it's a style issue. However, it's an awkward style issue and > > anyone implementing a target should be looking over the complete list > > of methods anyway. > > Of course. It's not about writing the target in the first > place, it's about reading it and maintaining it later. Say, > a year from now, someone adds a new method but doesn't spend > all the effort necessary to make all N targets work > correctly with the change, which is reasonable since it's > not sensible to insist that everyone be familiar with the > issues of all N targets before doing any work. > > Absence of an initializer is a simple indication that > someone should look at it and make sure it's ok. No. New target methods need to be optional, else someone will be required to go back and implement them for all old targets. The fact that they don't need to be initialized to zero is intentional, so that a new method does not require any modification to old targets. If there is no initialization, and indeed no mention of the new method at all in an old target module, you can safely conclude that the module doesn't implement the method.