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

Michael Barker mikeb01 at gmail.com
Mon Jan 31 01:08:21 CET 2022


> > 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
particular check, but -Wpendantic.  I'll update the commit message.

However I can't find an attribute that is cross platform.  There is the
#error directive, but it does not work as an attribute.  I've also tried
adding `#if __clang__` around the macro as well, but the warning still gets
triggered by clang.

If there are any other options that I've missed, let me know and I can try
them out.

Mike.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20220131/66146352/attachment-0001.htm>


More information about the dev mailing list