From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31725 invoked by alias); 5 Apr 2011 14:40:46 -0000 Received: (qmail 31542 invoked by uid 22791); 5 Apr 2011 14:40:43 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (94.185.240.25) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Tue, 05 Apr 2011 14:40:29 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 05 Apr 2011 15:40:26 +0100 Received: from [10.1.67.34] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Tue, 5 Apr 2011 15:40:25 +0100 Subject: Re: [PATCH] cleanup gcse.c:canon_modify_mem_list From: Richard Earnshaw To: Jeff Law Cc: Nathan Froyd , gcc-patches@gcc.gnu.org In-Reply-To: <4D9B1410.80000@redhat.com> References: <20110404014451.GA16239@nightcrawler> <4D9A0765.6020901@redhat.com> <20110405114440.GE23480@codesourcery.com> <1302006159.25036.12.camel@e102346-lin.cambridge.arm.com> <20110405123041.GG23480@codesourcery.com> <1302008146.25036.15.camel@e102346-lin.cambridge.arm.com> <4D9B1410.80000@redhat.com> Date: Tue, 05 Apr 2011 14:40:00 -0000 Message-Id: <1302014419.25036.23.camel@e102346-lin.cambridge.arm.com> Mime-Version: 1.0 X-MC-Unique: 111040515402603901 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00351.txt.bz2 On Tue, 2011-04-05 at 07:07 -0600, Jeff Law wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On 04/05/11 06:55, Richard Earnshaw wrote: > >=20 > > On Tue, 2011-04-05 at 05:30 -0700, Nathan Froyd wrote: > >> On Tue, Apr 05, 2011 at 01:22:39PM +0100, Richard Earnshaw wrote: > >>> On Tue, 2011-04-05 at 04:44 -0700, Nathan Froyd wrote: > >>>>> nit; You're missing some whitespace here (after the VEC). > >>>> > >>>> This doesn't seem to be a hard-and-fast policy; all of the VEC code I > >>>> remember writing or looking at recently has no spaces, and I checked= the > >>>> patch in on that basis. However, running grep indicates that we hav= e a > >>>> profusion of styles... > >>> > >>> I think the style guide is quite clear on this: there should be a spa= ce > >>> there as Jeff says. The fact that some code has crept in with other > >>> styles doesn't make them right, or give justification for ignoring the > >>> style guide. > >> > >> Would you like a patch for the hundreds of instances without spaces? > >> > >> Certainly vec.h never uses spaces; I thought this was simply The Way > >> Things Were. > >> > >> -Nathan > >> > >=20 > > IMO, rototils are generally pointless. If you are fixing code nearby > > then yes, fix the formatting issues. Otherwise, just don't exacerbate > > the problem, or we'll reach the point where a rototil really does become > > necessary. > Well, the other approach is to have a commit hook which automatically > deals with formatting crap by running indent, or whatever tool we want. >=20 > That would take the decision out of the hands of the developer and free > the reviewer from having to catch such things and ensures there is a > canonical form for our sources. Only if a tool either 1) Has a way to over-ride it when it's being stupid, or... 2) is never stupid... Most indent tools don't handle comments very well, IMO. For example: /* Some commentary text... Some Code Fragment some more commentary text. */ if you auto-indent that, you'll often end up with the code fragment, which was deliberately given extra indentation being moved to the same indentation as the surrounding text. In some cases that can lose important information. R.