[PATCH v2] Add pragma to ignore gcc-compat warnings in clang when used with diagnose_if.
Thomas Monjalon
thomas at monjalon.net
Thu Jan 20 15:16:47 CET 2022
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?
> 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
Please could you explain how it is related to -Wgcc-compat?
[...]
> #define __rte_internal \
> +_Pragma("GCC diagnostic push") \
> +_Pragma("GCC diagnostic ignored \"-Wgcc-compat\"") \
> __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \
> -section(".text.internal")))
> +section(".text.internal"))) \
> +_Pragma("GCC diagnostic pop")
More information about the dev
mailing list