Re: clang 10 -Wimplicit-fallthrough

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Fri, 05 Jun 2020 09:02:01 +1000, Darren Tucker wrote:

> This is because clang 10's -Wimplicit-fallthrough doesn't understand
> /* FALLTHROUGH */ but rather requires __attribute__((fallthrough)):

Correct.  Older versions of clang ignored -Wimplicit-fallthrough
for C code because there wasn't a way to annotate the fallthrough.
Unlike gcc, clang doesn't recognize /* FALLTHROUGH */ comments.
The full list of patterns accepted by gcc are docutmented in
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough

> None of our code has this (OpenSSH itself or the OpenBSD compat code) so
> at the moment it makes the -Werror build useless with clang.  I'd like
> to add a /* FALLTHROUGH */ to our test which will effectively disable
> -Wimplicit-fallthrough where it is currently not useful to us:

That seems like the best approach.  Currently, clang's
-Wimplicit-fallthrough option is deficient, so it is best to just
avoid using it.

 - todd
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux