From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30888 invoked by alias); 14 Mar 2011 08:20:29 -0000 Received: (qmail 30880 invoked by uid 22791); 14 Mar 2011 08:20:26 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT,TW_BJ X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Mar 2011 08:20:20 +0000 Received: from md1.u-strasbg.fr (md1.u-strasbg.fr [IPv6:2001:660:2402::186]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id p2E8K6t4044272 ; Mon, 14 Mar 2011 09:20:06 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms4.u-strasbg.fr [130.79.204.13]) by md1.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p2E8K66S032729 ; Mon, 14 Mar 2011 09:20:06 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p2E8K4Xc065764 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Mon, 14 Mar 2011 09:20:05 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Eli Zaretskii'" Cc: References: <20110312015329.GA20179@sourceware.org> <010f01cbe157$aebb5cb0$0c321610$@muller@ics-cnrs.unistra.fr> In-Reply-To: Subject: RE: New ARI warning Sat Mar 12 01:53:29 UTC 2011 Date: Mon, 14 Mar 2011 11:26:00 -0000 Message-ID: <006701cbe220$a1a8dba0$e4fa92e0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00709.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Eli Zaretskii > Envoy=E9=A0: dimanche 13 mars 2011 11:24 > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: New ARI warning Sat Mar 12 01:53:29 UTC 2011 >=20 > > From: "Pierre Muller" > > 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. >=20 > The rule to detect "()" without a "void" is fine, but why on Earth do > we need the other rule, about prototypes like this: >=20 > int > foo (bar); >=20 > This is a perfectly valid formatting. In your patch, you modify long > prototypes like this as follows: >=20 > extern struct hppa_objfile_private * > -hppa_init_objfile_priv_data (struct objfile *objfile); > + hppa_init_objfile_priv_data (struct objfile *objfile); >=20 > 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. >=20 > 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=20 (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 "=20 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.