eal: ignore gcc-compat warning in clang-only macro
authorMichael Barker <mikeb01@gmail.com>
Mon, 31 Jan 2022 00:05:16 +0000 (13:05 +1300)
committerThomas Monjalon <thomas@monjalon.net>
Sat, 12 Feb 2022 13:37:47 +0000 (14:37 +0100)
commited57d08dfd4402a214fd60f1cd25faf9a5b3b2c3
tree49190e7b4b771927d31b9f06a03aca8f335f94e3
parent5e437164df11fb2fbc96a26b30b65d05f502f584
eal: ignore gcc-compat warning in clang-only macro

When compiling with clang using -Wpedantic (or -Wgcc-compat) the use of
diagnose_if kicks up a warning:

.../include/rte_interrupts.h:623:1: error: 'diagnose_if' is a clang
extension [-Werror,-Wgcc-compat]
__rte_internal
^
.../include/rte_compat.h:36:16: note: expanded from macro '__rte_internal'
__attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \

This change ignores the '-Wgcc-compat' warning in the specific location
where the warning occurs.  It is safe to do in this circumstance as the
specific macro is only defined when using the clang compiler.

Signed-off-by: Michael Barker <mikeb01@gmail.com>
lib/eal/include/rte_compat.h