DPDK patches and discussions
 help / color / mirror / Atom feed
* RHEL 7 gcc 4.8.5 cannot ignore -Wdiscarded-qualifiers
@ 2022-10-07 16:39 Morten Brørup
  0 siblings, 0 replies; only message in thread
From: Morten Brørup @ 2022-10-07 16:39 UTC (permalink / raw)
  To: dev

Anyone from Red Hat care to suggest a fix for the problem below, related to the ancient GCC (version 4.8.5) on RHEL 7?

I get this warning:
error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]

for source code containing:
#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"


Here's the link to the failing CI test: https://lab.dpdk.org/results/dashboard/patchsets/23818/#env-36

Here's the source code triggering the error:

/**
 * @internal
 * Workaround for _mm_stream_load_si128() missing const in the parameter.
 */
__rte_internal
static __rte_always_inline
__m128i _mm_stream_load_si128_const(const __m128i * const mem_addr)
{
#if defined(RTE_TOOLCHAIN_GCC)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
#endif
	return _mm_stream_load_si128(mem_addr);
#if defined(RTE_TOOLCHAIN_GCC)
#pragma GCC diagnostic pop
#endif
}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-07 16:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-07 16:39 RHEL 7 gcc 4.8.5 cannot ignore -Wdiscarded-qualifiers Morten Brørup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).