From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: <gdb-patches@sourceware.org>
Subject: RE: New ARI warning Sat Mar 12 01:53:29 UTC 2011
Date: Mon, 14 Mar 2011 11:26:00 -0000 [thread overview]
Message-ID: <006701cbe220$a1a8dba0$e4fa92e0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <E1PyiT1-0005DR-16@fencepost.gnu.org>
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Eli Zaretskii
> Envoyé : dimanche 13 mars 2011 11:24
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: New ARI warning Sat Mar 12 01:53:29 UTC 2011
>
> > From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> > Date: Sun, 13 Mar 2011 09:21:35 +0100
> >
> > This is the consequence of the two new ARI rules I added:
> > http://sourceware.org/ml/gdb-patches/2011-03/msg00654.html
> >
> > As I just introduced these new rules,
> > I felt that it would be cheating to
> > use OBVIOUS rule as we normally do to fix
> > a ARI regression...
> > This is why I will submit shortly two patches
> > to remove all those new warnings.
>
> The rule to detect "()" without a "void" is fine, but why on Earth do
> we need the other rule, about prototypes like this:
>
> int
> foo (bar);
>
> This is a perfectly valid formatting. In your patch, you modify long
> prototypes like this as follows:
>
> extern struct hppa_objfile_private *
> -hppa_init_objfile_priv_data (struct objfile *objfile);
> + hppa_init_objfile_priv_data (struct objfile *objfile);
>
> But that is not a good idea, because if you type TAB in Emacs on the
> line with the function name, Emacs will reindent the name to column
> zero. So I expect this rule to annoy us quite a bit, e.g. if someone
> reindents a large region.
>
> Can you tell why we need this?
See
http://sourceware.org/ml/gdb-patches/2011-03/msg00651.html
This way you will find only the implementation of function foo_function
using grep:
grep "^foo_function" *
I really thought that prototypes,
either in header or in C sources should not be found by that
pattern and that it shouls thus either be on a single line,
or be indented to avoid being on first column.
Notice that the new rule only found a few of these
extern TYPE
long_func_name (with_long_parameters);
Would it be better to reformat those as
extern TYPE long_func_name
(with_long_parameters);
instead of
extern TYPE
long_func_name (with_long_parameters);
I have no preference on that matter,
I would really like to avoid getting both the
prototype and the implementation if I do:
grep "^func_name "
That's the reason of this rule.
Tell us what you think about the alternate
I propose above and what we should do in your opinion.
Pierre Muller
as ARI maintainer.
next prev parent reply other threads:[~2011-03-14 8:20 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-12 2:17 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 [this message]
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
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='006701cbe220$a1a8dba0$e4fa92e0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/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