This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH: Remove unnecessary zero-initializations
- From: Michael Snyder <msnyder at redhat dot com>
- To: Felix Lee <bdgle at tigerfood dot org>, gdb-patches at sources dot redhat dot com
- Date: Wed, 13 Nov 2002 11:04:16 -0800
- Subject: Re: PATCH: Remove unnecessary zero-initializations
- Organization: Red Hat, Inc.
- References: <200211112116.gABLGeB03251@paper-wolf-solo.tigerfood.org>
Felix Lee wrote:
>
> Daniel Jacobowitz <drow@mvista.com>:
> > 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.