This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Delete struct inferior_suspend_state
- From: Doug Evans <xdje42 at gmail dot com>
- To: Stan Shebs <stanshebs at earthlink dot net>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Sat, 9 Aug 2014 13:53:03 -0700
- Subject: Re: [PATCH] Delete struct inferior_suspend_state
- Authentication-results: sourceware.org; auth=none
- References: <yjt2silh73aa dot fsf at ruffy dot mtv dot corp dot google dot com> <53E55C6F dot 80901 at earthlink dot net>
On Fri, Aug 8, 2014 at 4:25 PM, Stan Shebs <stanshebs@earthlink.net> wrote:
> On 7/31/14, 12:10 PM, Doug Evans wrote:
>> Hi.
>>
>> I happened across some #if 0's in the code and thought that odd.
>>
>> I found the relevant thread here:
>>
>> https://sourceware.org/ml/gdb-patches/2012-06/msg00370.html
>>
>> Any desire to continue to keep this, or can we delete it?
>> [I don't have a strong preference, but it feels like it's time.]
>
> I was sure we had set a policy to delete code instead of doing #if 0,
> but I can't find anything in writing that says so.
>
> In any case, retaining dead code seems pointless when version control
> systems make it easy to find again.
... assuming you know it's there to look for.
In this particular case, the intent is to leave documentation on how
it's intended a particular bit of code be extended (in part because C
doesn't allow empty structs so a compromise is made).
Would anyone faced with a particular situation such as this go back
through the repo looking just in case such documentation was there and
then got deleted? Perhaps, but I'd totally understand if someone
ended up putting time into it only to be told a decision has been made
to do it differently and being disappointed that the documentation of
that decision was in deleted text recorded only in the repo. [It may
turn out that the "decision" is not an absolute one of course, but
it's still documentation we're talking about, not (dead) code.]
Maybe in addition to a rule to not use #if 0, we also need a rule to
not document how it's intended code be extended (at least not as the
code).
I can see a case made for either side of this, depending on the situation.