From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: compilation error on Suse 11 - LPM init of anon union Date: Sat, 13 Jan 2018 20:14:06 +0100 Message-ID: <13541534.8OkorCjPcv@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: adrien.mazarguil@6wind.com, dev@dpdk.org, hemant.agrawal@nxp.com, bruce.richardson@intel.com To: qian.q.xu@intel.com Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 44EA9727F for ; Sat, 13 Jan 2018 20:14:40 +0100 (CET) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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__ = =20 #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 =E2=80=98add_depth_big_v20=E2=80=99: lib/librte_lpm/rte_lpm.c:886:4: error: unknown field =E2=80=98group_idx=E2=80=99 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