From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by dpdk.org (Postfix) with ESMTP id 03DA35928 for ; Fri, 3 Oct 2014 00:15:25 +0200 (CEST) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail.windriver.com (8.14.9/8.14.5) with ESMTP id s92MMGbT023541 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Thu, 2 Oct 2014 15:22:16 -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; Thu, 2 Oct 2014 15:22:15 -0700 From: "Wiles, Roger Keith" To: "" Thread-Topic: [PATCH v3] Clang compile error with RTE_LIBRTE_MEMPOOL_DEBUG enabled. Thread-Index: AQHP3Zq20jfQrAMQgkCtmVO8gqTgopwd2MaA Date: Thu, 2 Oct 2014 22:22:15 +0000 Message-ID: <27B9DA66-962B-48AC-BD5D-C27C33F9E454@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> <15C5CF10-E6AC-43A4-A24F-F96E878EE70A@windriver.com> In-Reply-To: <15C5CF10-E6AC-43A4-A24F-F96E878EE70A@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: <216A8AFB5A60184A9D66CD4C99EA1722@local> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Thu, 02 Oct 2014 22:15:26 -0000 Resend as it is missing in patchwork. 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