[llvmlinux] [PATCH] sched/fair: disable clang -Wconstant-logical-operand
ndesaulniers at google.com
Tue Aug 28 22:49:01 UTC 2018
On Mon, Aug 27, 2018 at 12:15 PM Peter Zijlstra <peterz at infradead.org> wrote:
> 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:
> which asked if:
> #define sched_feat(x) !!(sysctl_sched_features & (1UL << __SCHED_FEAT_##x))
> would work, since that casts to a bool.
Tested-by: Nick Desaulniers <ndesaulniers at google.com>
Peter, can you send this upstream?
More information about the LLVMLinux