"Roland Illig" writes:
> Module Name:  src
> Committed By: rillig
> Date:         Sun Aug 29 09:29:32 UTC 2021
>
> Modified Files:
>       src/tests/usr.bin/xlint/lint1: msg_220.c msg_220.exp
>       src/usr.bin/xlint/common: lint.h
>       src/usr.bin/xlint/lint1: lex.c
>
> Log Message:
> lint: allow 'fallthrough' as alternative spelling of FALLTHROUGH

if you would like to see what GCC allows here, it's pretty involved.
see external/gpl3/gcc/dist/libcpp/lex.c:fallthrough_comment_p().

if the comments are to be believed, it does:

  /* -Wimplicit-fallthrough=2 looks for (case insensitive)
     .*falls?[ \t-]*thr(u|ough).* regex.  */

  /* Whole comment contents (regex):
     lint -fallthrough[ \t]*

  /* Whole comment contents (regex):
     [ \t]*FALLTHR(U|OUGH)[ \t]*

  /* Whole comment contents (regex):
     [ \t.!]*(ELSE,? |INTENTIONAL(LY)? )?FALL(S | |-)?THR(OUGH|U)[ 
\t.!]*(-[^\n\r]*)?
     [ \t.!]*(Else,? |Intentional(ly)? )?Fall((s | |-)[Tt]|t)hr(ough|u)[ 
\t.!]*(-[^\n\r]*)?
     [ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?fall(s | |-)?thr(ough|u)[ 
\t.!]*(-[^\n\r]*)?



.mrg.

Reply via email to