[llvmlinux] [PATCH] sched/fair: disable clang -Wconstant-logical-operand

Peter Zijlstra peterz at infradead.org
Mon Aug 27 19:15:06 UTC 2018


A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

On Mon, Aug 27, 2018 at 10:18:09AM -0700, Nick Desaulniers wrote:
> Please file a bug.  There's more issues with clang in this regard:
> https://bugs.llvm.org/show_bug.cgi?id=38571 (there should be more
> warnings in this code).  IMO, we should fix the code (if under all
> configs the expression contains constants), not disable the warning.

It's just one config that produces the warning. IMO the warning is
pretty useless.

That said; I never got a response on:

  https://lkml.kernel.org/r/20180420165139.GP4064@hirez.programming.kicks-ass.net

which asked if:

  #define sched_feat(x) !!(sysctl_sched_features & (1UL << __SCHED_FEAT_##x))

would work, since that casts to a bool.


More information about the LLVMLinux mailing list