[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wic_SpqRhtFF+_9wFOiUf-NZcTsNH+jNdi0xLPxexNGXg@mail.gmail.com>
Date: Wed, 2 Apr 2025 12:06:01 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Petr Mladek <pmladek@...e.com>, Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>, John Ogness <john.ogness@...utronix.de>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>, Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] more printk for 6.15
On Wed, 2 Apr 2025 at 11:39, Andy Shevchenko <andy.shevchenko@...il.com> wrote:
>
> Yes. Clang complains on unknown pragma.
What a crock.
It says GCC, for chrissake!
And clang clearly doesn't complain about
> +#pragma GCC diagnostic push
> +#pragma GCC diagnostic pop
which are *not* protected by that #ifndef __clang__ thing.
So this smells like a clang bug to me.
Can we please use wrapper defines instead so that we don't have that
#ifndef in the middle of code? And since those don't work with
'#pragma', they need to use the _Pragma() operator instead.
Something like
#define GCC_PRAGMA(x) _Pragma(#x)
in compiler-gcc.h, and then add a
#ifndef GCC_PRAGMA
#define GCC_PRAGMA(x) /* Nothing */
#endif
and then you can just do
GCC_PRAGMA(Wsuggest-attribute=format)
in places like this?
(Entirely untested: I *despise* pragma in general).
Or hey, how about we just add "-Wno-suggest-attribute=format" to the
compiler command line? Like we do for all the other garbage warnings
that we don't want to see.
Linus
Powered by blists - more mailing lists