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 C9D73A0A02; Wed, 24 Mar 2021 18:52:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5958E140F7F; Wed, 24 Mar 2021 18:52:45 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 3CE8C140F7A for ; Wed, 24 Mar 2021 18:52:44 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id C209D5C00C2; Wed, 24 Mar 2021 13:52:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 24 Mar 2021 13:52:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= uO42tlyYaQqL6EVGjvZxSaguajlrxbiZMaHFchUMzRI=; b=B4wY7NVJu1rCu4kO IdutIA9lNefVTG8YA03vKS29+1HOj4LKwcbRpQ9zHNfioV7SluBBX2fLtDtMBWvb bUiKGm3TBNgVQVE61xDacYKpovFi55IsiyhOABECT10u4D6XiL+ZOKNS5N3A8reI PkO0YneuNMVcIdpZwwlOjPoZoFReVcpF67nyoZe8oONipuBfmoX0gPJrsOcQZppJ kEGQmoZWE0VpasO91QalmRr3m8j1ibp1ycL06Q/q6dgiB7cKnKDF4Me1F8QW/1nk TVx7J8gx8yZCVbCAE/Ehcor/Hv6ZjvGJC1gCXiAqKsvXUUJSPUyQkjJo4gtEdWDF h/BjRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=uO42tlyYaQqL6EVGjvZxSaguajlrxbiZMaHFchUMz RI=; b=cqnAcjbyjwioci+WnGfV9xXS6EYRhquVetsff67xATDCAS760q4BlqBxz 9GjFJMXKdyToBkppKIna7Gwy5wP85N/SIa63STRU1R0vH63akv9KjpF5iucyzamO 8T+YbZnQmkyYQ2dM7A1tk4Ak0PdaFGNFagGjWS5v95moKRxNq2yXMuhpiXD98+wc gXaWoTUctZflVxPimKjvurCryu2MWbjZNWhsBkZFHxdXxOBVpYOTGj8D1KwZlO/B 0uWTpVIe/u00RNTNQmu6O/Fh2gEipH3bCOkncGwl+ZY04eAwAmqjA9MC8gNc+YcW O2BdvvSCvPsH2Kh8pKXNxfnybVjPg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudegkedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgjfhgggfgtsehtuf ertddttddvnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghs sehmohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepudeggfdvfeduffdtfe eglefghfeukefgfffhueejtdetuedtjeeuieeivdffgeehnecukfhppeejjedrudefgedr vddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4D950240422; Wed, 24 Mar 2021 13:52:42 -0400 (EDT) From: Thomas Monjalon To: Tyler Retzlaff Cc: dev@dpdk.org, david.marchand@redhat.com, bruce.richardson@intel.com, stephen@networkplumber.org, drc@linux.vnet.ibm.com Date: Wed, 24 Mar 2021 18:52:40 +0100 Message-ID: <11634428.8dEGKDZn2b@thomas> In-Reply-To: <20210324172841.GC14991@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1616560011-31647-1-git-send-email-roretzla@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <6578330.zVv2phWGOd@thomas> <20210324172841.GC14991@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 24/03/2021 18:28, Tyler Retzlaff: > 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. The asm keyword is part of all C++ standards? It seems asm is non-standard in C, that's why we use __asm__. > 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. Yes we need to make sure there is no specific extension involved. Is C++ asm the same as the C __asm__? > 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. No, C++ is probably the right scope. > let me know how to adjust the patch i'll submit a new version. I don't know yet. I would like to understand the global picture, and have it properly documented in this commit log.