Thread (6 messages) 6 messages, 4 authors, 2015-03-06

Re: [PATCH] headers: typeof -> __typeof__ to unbreak C++11 code

From: Simon Kågström <hidden>
Date: 2015-02-26 11:24:33

On 2015-02-26 12:14, Thomas Monjalon wrote:
2015-02-25 14:28, Simon Kagstrom:
quoted
When compiling C++11-code or above (--std=c++11), the build fails with
lots of

  rte_eth_ctrl.h:517:3: note: in expansion of macro RTE_ALIGN
    (RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT32_BIT)/UINT32_BIT)
    ^
I'd like to be sure that it's working with every compilers we support
(gcc, icc, clang).
Anyone to check please?
I guess you mean compiling DPDK itself, but I can add that compiling my
example "app" (i.e., a file which includes the DPDK headers and an empty
main()) with clang++ gives more problems:

  include/rte_devargs.h:89:5: error:
      'virtual' can only appear on non-static member functions
                } virtual;
                  ^

and a slew of warnings of the type

  include/rte_byteorder_64.h:45:2: warning:
      'register' storage class specifier is deprecated
[-Wdeprecated-register]
        register uint64_t x = _x;
        ^~~~~~~~~

include/rte_memcpy.h:85:25: warning:
      cast from 'const uint8_t *' (aka 'const unsigned char *') to
      'const __m128i *' increases required alignment from 1 to 16
[-Wcast-align]
        xmm0 = _mm_loadu_si128((const __m128i *)src);

// Simon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help