> Date: 2026-11-10 15:45:13+0000 > From: sashiko-bot@kernel.org > > Thank you for your contribution! Sashiko AI review found 2 potential > issues to consider: > - [High] string: void pointer subscript in QVoid_of() breaks Clang > builds It seems I can't build with LLVM in the way that sashiko suggested in the other mail, so I can't reproduce this: $ make LLVM=1 SYNC include/config/auto.conf HOSTCC scripts/basic/fixdep clang: error: invalid linker name in argument '-fuse-ld=lld' make[3]: *** [scripts/Makefile.host:114: scripts/basic/fixdep] Error 1 make[2]: *** [Makefile:682: scripts_basic] Error 2 make[1]: *** [/srv/alx/src/linux/linux/llvm/Makefile:912: include/config/auto.conf] Error 2 make[1]: *** [include/config/auto.conf] Deleting file 'include/generated/rustc_cfg' make[1]: *** [include/config/auto.conf] Deleting file 'include/generated/autoconf.h' make: *** [Makefile:248: __sub-make] Error 2 But I see no reason why Clang shouldn't build this. I've written a small test program just to see, and Clang seems to just work well: alx@devuan:~/tmp$ cat const.c #include #define QVoid_of(p) typeof((__QVoidptr_of(p)){0}[0]) #define __QVoidptr_of(p) typeof(1?(p):(void*){0}) int main(void) { const void *p; QVoid_of(p) *q; // const void * } alx@devuan:~/tmp$ gcc -Wall -Wextra -Wno-unused const.c alx@devuan:~/tmp$ clang -Wall -Wextra -Wno-unused const.c alx@devuan:~/tmp$ Unless anyone can actually reproduce the build issue, I'll assume this report is nonsense. > - [Medium] string: QChar_of() fails to compile when pointee has > qualifiers other than Q That's actually desirable. You don't want to call strchr(3) with a pointer to volatile. > -- > > commit cea37634307d89ede7b6ca6128f006d50a90391c > Author: Alejandro Colomar > > string: Add [C]QChar_of() and QVoid_of() > > This commit introduces the QVoid_of(), QChar_of(), and CQChar_of() helper > macros in include/linux/string.h to support qualifier-generic string macros. > > > diff --git a/include/linux/string.h b/include/linux/string.h [...] > > [Severity: High] > Does applying the array subscript [0] to a void pointer in QVoid_of() > break Clang builds? I don't see why it would. I can't use LLVM myself, so can't reproduce, but a small test program shows that Clang works just fine with it. > __QVoidptr_of(p) produces a pointer to (qualified) void. Because array > subscripting requires a pointer to a complete object type, Clang rejects > (__QVoidptr_of(p)){0}[0] even inside typeof() with an incomplete type > error, and GCC emits a -Wpointer-arith warning when pointer arithmetic > warnings are enabled. Using unary * instead of [0], such as > typeof(*(__QVoidptr_of(p)){0}), avoids both issues. This is a lie, unless anyone can confirm. [...] > [Severity: Medium] > Can QChar_of() fail to compile when the pointed-to type of p carries a > qualifier other than Q? Indeed, a desirable property. > QVoid_of(p) preserves all qualifiers on the target of p, but the _Generic > selection only matches exact Q void * and unqualified void *. Passing a > volatile char * or const volatile char * to CQChar_of(p) produces a > volatile void * or const volatile void * controlling expression, which > matches neither association and fails at compile time. Matching against > Q QVoid_of(p) *: (Q char){0} and default: (char){0} would test specifically > for Q regardless of other qualifiers. You certainly don't want to pass a volatile char* to strchr(3). Alex --