Re: [PATCH] error: drop spurious semicolon

2014-09-04 Thread Eric Blake
On 09/04/2014 10:28 AM, Eric Blake wrote: > limited to .[ch] files (maybe .y as well). So looking at emacs.git > (commit 5c9a1ec6), I see: > > $ git grep '; *;' -- '**/*.[chy]' | grep -v 'for (.*; *;.*)' Repeating on glibc.git commit 41488498: elf/tst-deep1mod2.c: return baz () + xyzzy ();; i

Re: [PATCH] error: drop spurious semicolon

2014-09-04 Thread Eric Blake
On 09/04/2014 10:15 AM, Paul Eggert wrote: > I just checked the Emacs source code for this, and found some spurious > semicolons, but also found several legitimate instances in strings and > comments. Would the new rule work with those? The idea is to write the rule with a regex that catches as m

Re: [PATCH] error: drop spurious semicolon

2014-09-04 Thread Paul Eggert
I just checked the Emacs source code for this, and found some spurious semicolons, but also found several legitimate instances in strings and comments. Would the new rule work with those?

Re: [PATCH] error: drop spurious semicolon

2014-09-04 Thread Eric Blake
On 09/04/2014 09:57 AM, Jim Meyering wrote: > On Thu, Sep 4, 2014 at 8:11 AM, Ben Pfaff wrote: >> On Thu, Sep 04, 2014 at 06:28:19AM -0600, Eric Blake wrote: >>> Noticed this while writing a syntax check rule to look for bogus >>> doubled semicolons. If there's interest, I could add this rule >>>

Re: [PATCH] error: drop spurious semicolon

2014-09-04 Thread Jim Meyering
On Thu, Sep 4, 2014 at 8:11 AM, Ben Pfaff wrote: > On Thu, Sep 04, 2014 at 06:28:19AM -0600, Eric Blake wrote: >> Noticed this while writing a syntax check rule to look for bogus >> doubled semicolons. If there's interest, I could add this rule >> to maint.mk: >> >> # Except for shell files and f

Re: [PATCH] error: drop spurious semicolon

2014-09-04 Thread Ben Pfaff
On Thu, Sep 04, 2014 at 06:28:19AM -0600, Eric Blake wrote: > Noticed this while writing a syntax check rule to look for bogus > doubled semicolons. If there's interest, I could add this rule > to maint.mk: > > # Except for shell files and for loops, double semicolon is probably a mistake > sc_pr

[PATCH] error: drop spurious semicolon

2014-09-04 Thread Eric Blake
* lib/error.c (__error_at_line): Fix ';;'. Signed-off-by: Eric Blake --- Pushing as trivial. Noticed this while writing a syntax check rule to look for bogus doubled semicolons. If there's interest, I could add this rule to maint.mk: # Except for shell files and for loops, double semicolon is