This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Delete struct inferior_suspend_state


On Thu, Jul 31, 2014 at 1:05 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> If we're going to keep comments we might as well keep the #if 0'd code
>> (which is fine by me).
>> There's no real difference between the two, and the #if 0'd out code
>> is more descriptive, though I would add a commit (tweak a comment?) so
>> that the next person will more easily know that the #if 0's are ok.
>> IWBN to have examples where #if 0 is at least not a bad thing.
>
> In my experience, #if 0'ed code has been bit-rotting. Better, IMO,
> to just be as descriptive as possible in the code, even if that
> involves naming functions, etc. That way, we can maintain the
> description a little better.

Comments don't necessarily fare much better.
Consider the 23 year old TODO. 1/2 :-)
ref: https://sourceware.org/ml/gdb-patches/2014-07/msg00832.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]