On Tue, 9 Dec 2025 at 18:06, Al Viro viro@zeniv.linux.org.uk wrote:
BTW, speaking of C23 fun that is supported by gcc 8, but not by sparse: __has_include().
Linus? Seeing that I'm touching pre-process.c anyway for the sake of __VA_OPT__, adding that thing ought to be reasonably easy
It sounds straightforward, and I'm certainly not going to object. I'm not sure how much we'd want to use it in the kernel: it might make it slightly easier to deal with various architectures and the "if the architecture has this header, use it, otherwise use the generic implementation" kinds of issues, but we do have fairly straightforward solutions for that already in our build system ('generic-y' and friends).
So I'm not convinced it really buys us anything - I suspect it's a lot more useful in "normal" projects that have to deal with non-standard system headers and possible lack of libraries etc etc. Our build environment is so self-sufficient that it's not nearly the same issue for the kernel.
Linus