[dpdk-dev] compilation error on Suse 11 - LPM init of anon union
Thomas Monjalon
thomas at monjalon.net
Sat Jan 13 20:14:06 CET 2018
Hi,
There is a new compilation error since this commit in LPM:
http://dpdk.org/commit/b2e1c99
The brace has been removed because unnecessary with anonymous union.
This union is declared with RTE_STD_C11 for compatibility
with old compilers:
/** C extension macro for environments lacking C11 features. */
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L
#define RTE_STD_C11 __extension__
#else
#define RTE_STD_C11
#endif
Unfortunately, it does not work on Suse 11 SP2 with GCC 4.5.1:
lib/librte_lpm/rte_lpm.c: In function ‘add_depth_big_v20’:
lib/librte_lpm/rte_lpm.c:886:4: error:
unknown field ‘group_idx’ specified in initializer
Curiously, the error is exactly the same with ICC 16.0.2:
http://dpdk.org/ml/archives/test-report/2018-January/038443.html
Is it really using different compilers in those 2 tests?
Someone to check the value of __STDC_VERSION__ with those compilers?
gcc -dM -E -xc /dev/null | grep STDC_VERSION
Thanks for the help
More information about the dev
mailing list