Re: [PATCH v4] Add pragma to ignore gcc-compat warnings in clang when used with diagnose_if.

2022-01-30 Thread Michael Barker
> > > +++ b/lib/eal/include/rte_compat.h > > @@ -33,8 +33,11 @@ section(".text.internal"))) > > #elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* > > For clang */ > > Why doesn't the __has_attribute take care of this? > I would have thought that gcc would check the for the attri

Re: [PATCH v4] Add pragma to ignore gcc-compat warnings in clang when used with diagnose_if.

2022-01-30 Thread Michael Barker
> > extension [-Werror,-Wgcc-compat] > > __rte_internal > > ^ > > Which clang version is this? > Clang 10, 11, 12 and 13. > Perhaps the allow internal API could use a different attribute that > could work in both cases? > I've realised I've made a small error. It is not -Wall that includes this

[PATCH v5] Add pragma to ignore gcc-compat warnings in clang when used with diagnose_if.

2022-01-30 Thread Michael Barker
;__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

[PATCH v4] Add pragma to ignore gcc-compat warnings in clang when used with diagnose_if.

2022-01-23 Thread Michael Barker
;__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

Re: [PATCH v2] Add pragma to ignore gcc-compat warnings in clang when used with diagnose_if.

2022-01-23 Thread Michael Barker
On Fri, 21 Jan 2022 at 03:16, Thomas Monjalon wrote: > 18/01/2022 00:23, Michael Barker: > > When using clang with -Wall the use of diagnose_if kicks up a warning, > > Please could you copy the warning in the commit log? > I've updated the commit log to be more descri

[PATCH v3] Add pragma to ignore gcc-compat warnings in clang when used with diagnose_if.

2022-01-23 Thread Michael Barker
;__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

[PATCH v2] Add pragma to ignore gcc-compat warnings in clang when used with diagnose_if.

2022-01-17 Thread Michael Barker
When using clang with -Wall the use of diagnose_if kicks up a warning, requiring all dpdk includes to be wrapped with the pragma. This change isolates the ignore just the appropriate location and makes it easier for users to apply -Wall,-Werror Signed-off-by: Michael Barker --- lib/eal/include

[PATCH] Add pragma to ignore gcc-compat warnings in clang when used with diagnose_if.

2022-01-17 Thread Michael Barker
Signed-off-by: Michael Barker --- lib/eal/include/rte_compat.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/eal/include/rte_compat.h b/lib/eal/include/rte_compat.h index 2718612cce..9556bbf4d0 100644 --- a/lib/eal/include/rte_compat.h +++ b/lib/eal/include