After https://reviews.llvm.org/D134461, Clang will diagnose a warning if
trying to deference void pointers in C mode. However, this causes a lot
of noises when compiling a 5.19.11 Linux kernel.
This patch reduces the warning by marking deferencing void pointers in
unevaluated context OK, like sizeof(*void_ptr), typeof(*void_ptr)
and etc.
Fixes https://github.com/ClangBuiltLinux/linux/issues/1720
Signed-off-by: Jun Zhang <jun@junz.org>
Sorry, I should have asked more about this subexpresssion.
Our CI is still red for older branches of the Linux kernel ("stable" branches) because the kernel only recently started using -std=gnu11 from -std=gnu89.
Why is this considered an error for -std=gnu89?