mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
compiler-gcc.h: Introduce __diag_GCC_all
It is not possible disabling a diagnostic for all versions of GCC
without hard coding the minimum supported version at the site, as the
GCC specific macros require a minimum version to disable the warning
for:
__diag_ignore(GCC, 5, ...);
__diag_ignore_all() does not solve this issue because it disables a
diagnostic for all versions of both GCC and clang, not just one or the
other.
Introduce __diag_GCC_all so that developers can write
__diag_ignore(GCC, all, ...);
to disable a particular diagnostic for all versions of GCC, while not
affecting clang.
Closes: https://lore.kernel.org/r/CAHk-=wgfX9nBGE0Ap9GjhOy7Mn=RSy=rx0MvqfYFFDx31KJXqQ@mail.gmail.com
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://patch.msgid.link/20250404-vsprintf-convert-pragmas-to-__diag-v1-1-5d6c5c55b2bd@kernel.org
Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
parent
bd67c1c3c3
commit
7efa84b5cd
1 changed files with 2 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue