From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by dpdk.org (Postfix) with ESMTP id 657D6212 for ; Wed, 1 Oct 2014 19:04:35 +0200 (CEST) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail1.windriver.com (8.14.9/8.14.5) with ESMTP id s91HBI9E024558 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 1 Oct 2014 10:11:18 -0700 (PDT) Received: from ALA-MBB.corp.ad.wrs.com ([169.254.1.18]) by ALA-HCB.corp.ad.wrs.com ([147.11.189.41]) with mapi id 14.03.0174.001; Wed, 1 Oct 2014 10:11:18 -0700 From: "Wiles, Roger Keith" To: Thomas Monjalon Thread-Topic: [PATCH v3] Clang compile error with RTE_LIBRTE_MEMPOOL_DEBUG enabled. Thread-Index: AQHP3Zq20jfQrAMQgkCtmVO8gqTgog== Date: Wed, 1 Oct 2014 17:11:17 +0000 Message-ID: <15C5CF10-E6AC-43A4-A24F-F96E878EE70A@windriver.com> References: <41114A6E-08AB-4269-9E4F-9930BD04D8E2@windriver.com> <3EC8A7DC-C947-40DC-B8FD-60023A12B00A@windriver.com> <1602501.e1dujvioa1@xps13> <0D8AEEBE-82D7-4DD4-9FF3-E86DF6C144B8@windriver.com> In-Reply-To: <0D8AEEBE-82D7-4DD4-9FF3-E86DF6C144B8@windriver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.25.40.166] Content-Type: text/plain; charset="Windows-1252" Content-ID: <851746A6CA57DC46A294344E1EA962AF@local> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: [dpdk-dev] [PATCH v3] Clang compile error with RTE_LIBRTE_MEMPOOL_DEBUG enabled. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 17:04:35 -0000 When enabling RTE_LIBRTE_MEMPOOL_DEBUG and compiling with clang compiler an error occurs, because ifdefed code now includes GCC pragmas. GCC 4.4 is when push_options and pop_options pragma show up. Rework to include Thomas=92s suggestion to drop push/pop pragma directives = for ignore/error directives. Signed-off-by: Keith Wiles --- lib/librte_mempool/rte_mempool.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_memp= ool.h index 95f19f9..163de86 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -313,7 +313,6 @@ static inline void __mempool_write_trailer_cookie(void = *obj) */ #ifdef RTE_LIBRTE_MEMPOOL_DEBUG #ifndef __INTEL_COMPILER -#pragma GCC push_options #pragma GCC diagnostic ignored "-Wcast-qual" #endif static inline void __mempool_check_cookies(const struct rte_mempool *mp, @@ -380,7 +379,7 @@ static inline void __mempool_check_cookies(const struct= rte_mempool *mp, } } #ifndef __INTEL_COMPILER -#pragma GCC pop_options +#pragma GCC diagnostic error "-Wcast-qual" #endif #else #define __mempool_check_cookies(mp, obj_table_const, n, free) do {} while(= 0) --=20 2.1.0 Keith Wiles, Principal Technologist with CTO office, Wind River mobile 972-= 213-5533