This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, contrib] Reduce check_GNU_style noise
- From: "Thomas Preud'homme" <thomas dot preudhomme at arm dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 28 Nov 2014 15:01:53 -0000
- Subject: [PATCH, contrib] Reduce check_GNU_style noise
- Authentication-results: sourceware.org; auth=none
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