This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH, contrib] Reduce check_GNU_style noise


On Thu, 4 Dec 2014, Thomas Preud'homme wrote:

> Ping?

Ok.

Thanks,
Richard.

> > -----Original Message-----
> > From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> > owner@gcc.gnu.org] On Behalf Of Thomas Preud'homme
> > Sent: Friday, November 28, 2014 3:02 PM
> > To: gcc-patches@gcc.gnu.org
> > Subject: [PATCH, contrib] Reduce check_GNU_style noise
> > 
> > Currently check_GNU_style.sh gives the error "There should be exactly
> > one space between function name and parentheses." for the following
> > kind of lines: tab[(int) idx]
> > 
> > This patch changes the check to only warn if there is 0 of 2+ space(s)
> > between a alphanumeric character and an opening parenthesis, rather
> > than 2+ space or anything else than a single space (which also was
> > redundant).
> > 
> > With the change, above lines are now not warned about but other
> > incorrect lines are still reported.
> > 
> > ChangeLog entry is as follows:
> > 
> > *** contrib/ChangeLog ***
> > 
> > 2014-11-28  Thomas Preud'homme  <thomas.preudhomme@arm.com>
> > 
> >         * check_GNU_style.sh: Warn for incorrect number of space in
> > function
> >         call only if 0 or 2+ spaces found.
> > 
> > 
> > diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh
> > index ef8fdda..5f90190 100755
> > --- a/contrib/check_GNU_style.sh
> > +++ b/contrib/check_GNU_style.sh
> > @@ -113,7 +113,7 @@ g 'Sentences should end with a dot.  Dot, space,
> > space, end of the comment.' \
> >      '[[:alnum:]][[:blank:]]*\*/' $*
> > 
> >  vg 'There should be exactly one space between function name and
> > parentheses.' \
> > -    '\#define' '[[:alnum:]]([^[:blank:]]|[[:blank:]]{2,})\(' $*
> > +    '\#define' '[[:alnum:]]([[:blank:]]{2,})?\(' $*
> > 
> >  g 'There should be no space before closing parentheses.' \
> >      '[[:graph:]][[:blank:]]+\)' $*
> > 
> > Is this ok for trunk?
> > 
> > Best regards,
> > 
> > Thomas
> > 
> > 
> > 
> 
> 
> 
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 21284
(AG Nuernberg)
Maxfeldstrasse 5, 90409 Nuernberg, Germany


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]