On Tue, Sep 8, 2020 at 2:33 AM Jonathan Wakely <jwakely....@gmail.com> wrote:
> > Nope. I had /* FALLTHROUGH */ on the line before a blank line before
> > the case label. After Googling, I found an explicit reference that you
> > had to spell it: // fall through
> > I did that, and it worked. So I'm moving on, but still ...
>
> The canonical reference is
> https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough
> and it says FALLTHROUGH is fine (except with -Wimplicit-fallthrough=5
> which "doesn’t recognize any comments as fallthrough comments, only
> attributes disable the warning").

Hi,

Thank you. It turns out it was in someone else's code that I'd
incorporated into my project.
The fall through comment was polluted with a colon that I hadn't noticed, as in:

    /* FALLTHROUGH: */

and your fall through regex doesn't allow for that.
I'd add a colon to the space, tab and '!' that the regex accepts.
Does your acceptance pattern accept these? It's hard for me to decipher.

getdefs/getdefs.c:        /* FALLTHROUGH */ /* NOTREACHED */
agen5/defLex.c:        /* FALLTHROUGH */ /* to Invalid input char */

I'd also recommend a modified error message that includes mention of
the approved comment.

Thank you.

Regards, Bruce

Reply via email to