From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by dpdk.org (Postfix) with ESMTP id BD08268AA for ; Wed, 1 Oct 2014 14:51:32 +0200 (CEST) Received: by mail-wi0-f182.google.com with SMTP id n3so512974wiv.3 for ; Wed, 01 Oct 2014 05:58:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=F8SFkgOVZA+sDfRy2hCwlQyeArrrXORa3PcHASJBiEw=; b=AHx+73lA9hDD6cgDQxKNb7pkj9gHA9I/NaFmyuGBDlwE55eXcfSjgeKYuTO0KFwAJN KASHG03T/6Vufr4V4JqvNBXADgD7TrdiL2Ia0UdW+A4dw+YCxi/1mEkSaFp1ICsI8Rfh M7Hq8GOY1eC00pKQJ5xtlYhVvbFc71UfcgEHpET98fYlI/CM04NV4aRQFOLkoPRimVNJ E5tqmido+jLF++yGJjknWC+eRgq4uIGIGd0qyL/kksV3RXtHp10/6Aaxrlg/M1BY7j9J JDZckB5LcmJu/dLTz32Vm39+me+jdTznVPUnK/OFy2CYtfjaIyaBBiM/MXD5gzQCQwCZ 0jEQ== X-Gm-Message-State: ALoCoQkr9+k7IjNQTA+8j9qTSJsYgaeTo19fSm1czdTdZqYIdhIWh4LuyO1lPMrOp1IIEjLjh+8v X-Received: by 10.180.19.193 with SMTP id h1mr14025266wie.14.1412168297815; Wed, 01 Oct 2014 05:58:17 -0700 (PDT) Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id mx19sm1809670wic.3.2014.10.01.05.58.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Oct 2014 05:58:16 -0700 (PDT) From: Thomas Monjalon To: "Wiles, Roger Keith" Date: Wed, 01 Oct 2014 14:58:05 +0200 Message-ID: <1602501.e1dujvioa1@xps13> Organization: 6WIND User-Agent: KMail/4.13.3 (Linux/3.15.8-1-ARCH; KDE/4.13.3; x86_64; ; ) In-Reply-To: <3EC8A7DC-C947-40DC-B8FD-60023A12B00A@windriver.com> References: <41114A6E-08AB-4269-9E4F-9930BD04D8E2@windriver.com> <3EC8A7DC-C947-40DC-B8FD-60023A12B00A@windriver.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] 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 12:51:32 -0000 2014-09-28 05:30, Wiles, Roger Keith: > 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. > > Signed-off-by: Keith Wiles [...] > -#ifndef __INTEL_COMPILER > +#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) > #pragma GCC push_options > #pragma GCC diagnostic ignored "-Wcast-qual" > #endif Does clang accept const casting with -Wcast-qual? I'd prefer to use the same logic as in rte_mempool.c: #pragma GCC diagnostic ignored "-Wcast-qual" #pragma GCC diagnostic error "-Wcast-qual" without using push/pop. Or if push/pop is really needed, it is implemented in clang: http://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas -- Thomas