This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
usage of tab in the indentation...
- From: Joel Brobecker <brobecker at gnat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 12 Sep 2002 12:06:25 -0700
- Subject: usage of tab in the indentation...
I don't really know where to ask this question, but since this is
bugging me in the GDB sources, I'll ask here.
I looked at the GNU Coding Standards manual, and they give a list of
recommendations on how GNU code should be formatted, but they don't
mention tabulations.
In the list of options to GNU indent that they give, they leave the
choice of tabs or not to indent (ie they use the default, which is to
use tabs): (http://www.gnu.org/prep/standards_23.html#SEC23).
I personally find that tabs are a nuisance, what are the advantages of
using tabs? So far, they make my editor insert cursor go sometimes "like
crazy" but more importantly, they sometimes screw the diff output.
Consider the following hunk:
<<
--- 2071,2082 ----
if (target_is_remote ())
{
if (args == 0 || *args == 0)
! {
! if (tracepoint_number == -1)
! error ("No current tracepoint -- please supply an argument.");
! else
! tdp = tracepoint_number; /* default is current TDP */
! }
else
tdp = parse_and_eval_long (args);
>>
See how the left curly brace is misplaced because of the tab?
Could we consider banning tabs in favor of spaces and add -nut to
the list of indent options in gdb_indent.sh?
(I am not trying to start a troll, ok? :-).
--
Joel