[PATCH v5] Add pragma to ignore gcc-compat warnings in clang when used with diagnose_if.
Thomas Monjalon
thomas at monjalon.net
Sat Feb 12 15:00:48 CET 2022
31/01/2022 01:05, Michael Barker:
> 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 at gmail.com>
Applied with following title, thanks:
eal: ignore gcc-compat warning in clang-only macro
More information about the dev
mailing list