Re: [RFC 6/8] x86_64/bug: Implement __WARN_printf()

Linus Torvalds
2025-06-02T15:02:45Z

On Mon, 2 Jun 2025 at 07:52, Peter Zijlstra <peterz@infradead.org> wrote:
>
> Use the normal COUNT_ARGS() trick to split the variadic WARN() macro
> into per nr_args sub-marcos, except use a custom mapping such that 4
> and above map to another variadic that does the current thing as
> fallback.

Does this horror work with clang? Because I suspect not. The games you
play with inline asm are too disgusting for words.

But honestly, even if it does,I really hate this kind of insane
complexity for dubious reasons.

If you have a warning that is *so* critical for performance that you
can't deal with the register movement that comes from the compiler
doing this for you, just remove the warning.

Don't make our build system do something this disgusting.

Linus