* [dpdk-dev] warnings when including DPDK headers from a C++17 source file
@ 2018-07-13 13:51 Montorsi, Francesco
2018-07-13 15:52 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Montorsi, Francesco @ 2018-07-13 13:51 UTC (permalink / raw)
To: dev
Hi all,
I just noticed that, because of the removal of the "register" keyword in C++17, when I compile my DPDK-enabled code with -std=c++17 I get the following:
In file included from ../../../Third-Party/cpp-libs/dpdk/include/rte_ether.h:53:0,
from ../../../Third-Party/cpp-libs/dpdk/include/rte_ethdev.h:186,
from HwEmulCaptureDPDK.cpp:43:
../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder.h: In function 'uint16_t rte_arch_bswap16(uint16_t)':
../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder.h:57:20: warning: ISO C++1z does not allow 'register' storage class specifier [-Wregister]
register uint16_t x = _x;
^
../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder.h: In function 'uint32_t rte_arch_bswap32(uint32_t)':
../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder.h:72:20: warning: ISO C++1z does not allow 'register' storage class specifier [-Wregister]
register uint32_t x = _x;
^
In file included from ../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder.h:121:0,
from ../../../Third-Party/cpp-libs/dpdk/include/rte_ether.h:53,
from ../../../Third-Party/cpp-libs/dpdk/include/rte_ethdev.h:186,
from HwEmulCaptureDPDK.cpp:43:
../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder_64.h: In function 'uint64_t rte_arch_bswap64(uint64_t)':
../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder_64.h:52:20: warning: ISO C++1z does not allow 'register' storage class specifier [-Wregister]
register uint64_t x = _x;
^
?Just thought to let you know... that's a small issue for me since I'm using -Werror
Thanks,
Francesco
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] warnings when including DPDK headers from a C++17 source file
2018-07-13 13:51 [dpdk-dev] warnings when including DPDK headers from a C++17 source file Montorsi, Francesco
@ 2018-07-13 15:52 ` Stephen Hemminger
2018-07-15 13:00 ` Montorsi, Francesco
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2018-07-13 15:52 UTC (permalink / raw)
To: Montorsi, Francesco; +Cc: dev
On Fri, 13 Jul 2018 13:51:21 +0000
"Montorsi, Francesco" <fmontorsi@empirix.com> wrote:
> Hi all,
>
>
> I just noticed that, because of the removal of the "register" keyword in C++17, when I compile my DPDK-enabled code with -std=c++17 I get the following:
>
>
>
> In file included from ../../../Third-Party/cpp-libs/dpdk/include/rte_ether.h:53:0,
> from ../../../Third-Party/cpp-libs/dpdk/include/rte_ethdev.h:186,
> from HwEmulCaptureDPDK.cpp:43:
> ../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder.h: In function 'uint16_t rte_arch_bswap16(uint16_t)':
> ../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder.h:57:20: warning: ISO C++1z does not allow 'register' storage class specifier [-Wregister]
> register uint16_t x = _x;
> ^
> ../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder.h: In function 'uint32_t rte_arch_bswap32(uint32_t)':
> ../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder.h:72:20: warning: ISO C++1z does not allow 'register' storage class specifier [-Wregister]
> register uint32_t x = _x;
> ^
> In file included from ../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder.h:121:0,
> from ../../../Third-Party/cpp-libs/dpdk/include/rte_ether.h:53,
> from ../../../Third-Party/cpp-libs/dpdk/include/rte_ethdev.h:186,
> from HwEmulCaptureDPDK.cpp:43:
> ../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder_64.h: In function 'uint64_t rte_arch_bswap64(uint64_t)':
> ../../../Third-Party/cpp-libs/dpdk/include/rte_byteorder_64.h:52:20: warning: ISO C++1z does not allow 'register' storage class specifier [-Wregister]
> register uint64_t x = _x;
> ^
>
>
> ?Just thought to let you know... that's a small issue for me since I'm using -Werror
>
>
> Thanks,
> Francesco
>
>
Why is DPDK code using register keyword at all? It is ignored by modern compilers.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] warnings when including DPDK headers from a C++17 source file
2018-07-13 15:52 ` Stephen Hemminger
@ 2018-07-15 13:00 ` Montorsi, Francesco
0 siblings, 0 replies; 3+ messages in thread
From: Montorsi, Francesco @ 2018-07-15 13:00 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
Hi,
________________________________________
From: Stephen Hemminger <stephen@networkplumber.org>
Sent: Friday, July 13, 2018 5:52 PM
To: Montorsi, Francesco
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] warnings when including DPDK headers from a C++17 source file
> Why is DPDK code using register keyword at all? It is ignored by modern compilers.
that's my question as well :)
Maybe register keyword could be removed at least from header files to make the life easier to whoever is using C++17... right now I worked around that by placing -Werror -Wno-register, but that's perhaps not the best solution
Francesco
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-15 13:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13 13:51 [dpdk-dev] warnings when including DPDK headers from a C++17 source file Montorsi, Francesco
2018-07-13 15:52 ` Stephen Hemminger
2018-07-15 13:00 ` Montorsi, Francesco
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).