Re: [PATCH RFC 0/5] kbuild: uapi: also test UAPI headers against C++ compilers

From: Nathan Chancellor

Date: Thu Mar 12 2026 - 04:16:26 EST


On Sun, Mar 08, 2026 at 10:24:00PM +0100, Thomas Weißschuh wrote:
> C++ language requirements differ from those of C.
>
> Also test the headers against C++ compilers to make sure no errors
> creep in accidentally.
>
> There was a previous attempt by David Howells[0], but today with the
> existing UAPI testing infrastructure the implementation is a bit nicer.
> This series does not derive from David's, as I found it only after
> writing my patches.
>
> [0] https://lore.kernel.org/lkml/nycvar.YFH.7.76.1809052120510.24932@xxxxxxxxxx/
>
> This depends on my other series "kbuild: uapi: remove usage of toolchain
> headers", which is currently in kbuild-next-unstable.
>
> Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
> ---
> Thomas Weißschuh (5):
> kbuild: uapi: move some compiler arguments out of the command definition
> kbuild: uapi: move all include path flags together
> kbuild: uapi: handle UML in architecture-specific exclusion lists
> kbuild: uapi: provide a C++ compatible dummy definition of NULL
> kbuild: uapi: also test UAPI headers against C++ compilers

Aside from my comment on patch 5, this seems reasonable to me.

Reviewed-by: Nathan Chancellor <nathan@xxxxxxxxxx>

Cheers,
Nathan