From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 76A56A0A02; Wed, 24 Mar 2021 18:28:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 088E5140F6D; Wed, 24 Mar 2021 18:28:44 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2235E140F61 for ; Wed, 24 Mar 2021 18:28:42 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2A58020B5680; Wed, 24 Mar 2021 10:28:41 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2A58020B5680 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1616606921; bh=m+IM3hbaOpFEOz4jxnUGnabwg17zVfJ7kaqFYd5nHk0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P24LW16XcsEkSJomakapZJb3llyep8henAb5aMES8V4Ulva8r1j7eCtf60McbDd/L ptq3jsurfe10m/2ukx4MWdWZAoCE1kPWom3959ok02ucNjDXXQePvXlBZsPJQKC79i J3v2/Dn4zFuwM/8OHS2CPDqOjcDIX1UPd7La/awY= Date: Wed, 24 Mar 2021 10:28:41 -0700 From: Tyler Retzlaff To: Thomas Monjalon Cc: dev@dpdk.org, david.marchand@redhat.com, bruce.richardson@intel.com, stephen@networkplumber.org, drc@linux.vnet.ibm.com Message-ID: <20210324172841.GC14991@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1616560011-31647-1-git-send-email-roretzla@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <8251456.Wk86ePSIJQ@thomas> <20210324164512.GB14991@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <6578330.zVv2phWGOd@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6578330.zVv2phWGOd@thomas> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [dpdk-dev] [PATCH] eal: standard c++ forbids defining the keyword asm as a macro X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Mar 24, 2021 at 06:04:08PM +0100, Thomas Monjalon wrote: > 24/03/2021 17:45, Tyler Retzlaff: > > I understood this part. > > My question is more about the reason for having this define. > I think it is there because some compilers don't have asm keyword, > but have __asm__. And maybe that's the case for some C++ compilers. > If I'm right, this patch is breaking compilation with some > C++ compilers. so to qualify. you mean maybe it is breaking compilation of c++ in a compiler that explicitly violates c++ standard when compiling c++? that would mean it is not a c++ compiler. in general i don't think it is a good practice to have dpdk introduce names into the application namespace unqualified, but the point you make is valid it can break c++ compilation if something was using this macro as a convenience to the compiler specific extension __asm__. there will be further issues with varying syntaxes that __asm__-style extensions take from compiler to compiler as well. would you prefer that i change the preprocessor protection to include only windows? since i'm certain that this will break for any c++ compiler on windows the moment any stl header is included. let me know how to adjust the patch i'll submit a new version. thanks!