Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Cc: tromey@redhat.com, gdb-patches@sourceware.org
Subject: Re: [RFA-v2] Fix ARI warning about function call in first column
Date: Mon, 14 Mar 2011 17:17:00 -0000	[thread overview]
Message-ID: <83oc5dr6pj.fsf@gnu.org> (raw)
In-Reply-To: <001401cbe261$5490ec40$fdb2c4c0$%muller@ics-cnrs.unistra.fr>

> From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> Cc: <gdb-patches@sourceware.org>
> Date: Mon, 14 Mar 2011 17:03:16 +0100
> 
>   Eli, this still leaves us with two 
> cases for which we either have
> TYPE
>   NAME (PARAMS);
> or
> TYPE NAME (PARAMS);
> with a single line that exceeds 80 columns.

I see no problem with long lines, if there are no better alternatives.
I generally dislike tools that raise warnings for perfectly valid and
readable code, and I don't think we must every follow minor stylistic
rule when that rule gives sub-optimal results.

But it sounds like I'm the only one (again).  So I give up: do
whatever you and others think is right, and I will crawl back under my
rock.


>   I didn't really understand your comment about
> automatic indenting by emacs because I never used emacs :(

In Emacs, hitting the TAB key anywhere on a line of code reindents
this line according to the current setting of the coding style.  The
default coding style is, not surprisingly, the GNU coding style
described in standards.texi.

So, when you hit TAB in a C source file on the second of the two lines
that say

TYPE
  NAME (PARAMS);

Emacs reindents it like this:

TYPE
NAME (PARAMS);

You can also re-indent a whole region of source in Emacs, by marking
the region and pressing TAB.  This is a very convenient way of
reformatting a large portion of code according to GNU standards (which
mostly happen to be GDB standards as well).  When you re-indent a
large region like that, it is easy to undo the kind of formatting you
want to enforce, shown above, because you will not generally go back
and examine each line of the reformatted region -- you trust Emacs to
DTRT.

The  net  result  will  be,   I  fear,  that  such  reformatting  will
inadvertently  undo the  indentation  of prototypes,  and trigger  ARI
warnings for no good reason.

I hope I made myself clear this time.


  parent reply	other threads:[~2011-03-14 16:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12  2:17 New ARI warning Sat Mar 12 01:53:29 UTC 2011 GDB Administrator
2011-03-13  9:32 ` Pierre Muller
2011-03-13 10:24   ` [RFA] Fix ARI warning about function call in first column (was : New ARI warning Sat Mar 12 01:53:29 UTC 2011) Pierre Muller
2011-03-13 13:42   ` [RFA] Fix ARI warnings about function with no parameters ( " Pierre Muller
2011-03-14 16:03     ` Pierre Muller
2011-03-13 19:39   ` New ARI warning Sat Mar 12 01:53:29 UTC 2011 Eli Zaretskii
2011-03-14 11:26     ` Pierre Muller
2011-03-14 12:13       ` Eli Zaretskii
2011-03-14 12:34         ` Pedro Alves
2011-03-14 12:34           ` Eli Zaretskii
2011-03-14 12:49           ` Pierre Muller
2011-03-14 13:06             ` Eli Zaretskii
2011-03-14 12:51           ` Eli Zaretskii
2011-03-14 12:52             ` Pierre Muller
2011-03-14 13:16               ` Eli Zaretskii
2011-03-14 12:59             ` Pedro Alves
2011-03-14 13:27               ` Eli Zaretskii
2011-03-14 13:46                 ` Pedro Alves
2011-03-14 15:46                 ` Pierre Muller
2011-03-19 21:15                   ` Mark Kettenis
     [not found]   ` <18667.385276831$1300008680@news.gmane.org>
2011-03-14 15:54     ` [RFA] Fix ARI warning about function call in first column Tom Tromey
2011-03-14 16:46       ` [RFA-v2] " Pierre Muller
2011-03-14 17:02         ` Tom Tromey
     [not found]       ` <001401cbe261$5490ec40$fdb2c4c0$%muller@ics-cnrs.unistra.fr>
2011-03-14 17:17         ` Eli Zaretskii [this message]
2011-03-14 17:26           ` Pierre Muller
     [not found]           ` <10281.0550401502$1300122152@news.gmane.org>
2011-03-14 17:39             ` Tom Tromey
2011-03-15 12:19               ` [RFA] Fix formatting in " Pierre Muller
     [not found]               ` <45563.9187516228$1300186224@news.gmane.org>
2011-03-15 15:42                 ` Tom Tromey
2011-03-15 16:01                   ` Pierre Muller
     [not found]           ` <002001cbe269$85ed0e60$91c72b20$%muller@ics-cnrs.unistra.fr>
2011-03-14 21:26             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83oc5dr6pj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox