From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: warnings when including DPDK headers from a C++17 source file Date: Fri, 13 Jul 2018 08:52:05 -0700 Message-ID: <20180713085205.1a255bf3@xeon-e3> References: <1531489881821.76380@empirix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" To: "Montorsi, Francesco" Return-path: Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id 36C10160 for ; Fri, 13 Jul 2018 17:52:09 +0200 (CEST) Received: by mail-pf0-f180.google.com with SMTP id c21-v6so18255930pfn.8 for ; Fri, 13 Jul 2018 08:52:09 -0700 (PDT) In-Reply-To: <1531489881821.76380@empirix.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 13 Jul 2018 13:51:21 +0000 "Montorsi, Francesco" 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.