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 08859A0A02; Wed, 24 Mar 2021 20:52:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86A0B141011; Wed, 24 Mar 2021 20:52:40 +0100 (CET) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mails.dpdk.org (Postfix) with ESMTP id CFA6D14100E for ; Wed, 24 Mar 2021 20:52:38 +0100 (CET) Received: by mail-pg1-f174.google.com with SMTP id u19so15416796pgh.10 for ; Wed, 24 Mar 2021 12:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OBLSkvntcet0YJ2DLPRUsKIMUjwi36uWtysWnB/yq6c=; b=JXUdbNL5+fI9ngJhXYT65ZtUFReb6vUX4ppNC+Aa6RX7/2BqIdUHDQP59pJwYqVzM1 oDU6sEhzXNmnU7hfR2LdgY2ESdaWQh5talC4Cob33YeZ4HZUHuufsX7oJ7tjEJir+fBl vsE2fmkdFUinMgWIcu1qfJYcRGiXMo4eSjfxPacOBpI/+lnfNFf6ZEKX4xSz70aOth47 2N/KAVYHIAdaxa1zz15Aei6rKGPFFRxj52hBO+yXhCq8v+L+hHB8aiOY2rxf6VOnTfxh tb/kzPOccpZ1ARzEVXEq5ly+ky2AKLpXSB0WlEtmTYAf2Z9xHl6BjGDN0rzsw0fW6jFs CASA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OBLSkvntcet0YJ2DLPRUsKIMUjwi36uWtysWnB/yq6c=; b=snLmBWAAbsMsuh6MybWNYZjs8Hs/Fc9w8dNyM5JqhzXcW4FPHkjqYJIH5HYvTiaN92 VyenV4gyfUvXy9ioPYLFNPjH736WLsuXpP79THA91qAv3fkJ8h3pSNubp6cjGuN1GoqV 0d0qQoJI9SC6Hkhrf5zLOwuTLM7/J9YugQl57PeMRuGl/I5S5azA2KkFKDaKpW71/PjW DgCk06TnbhLCKGoLmTS7Ibo6FE0dKqMROnHC+kPXauNinY3FwLIEZawZnm9jBQRdaGrt BPYNk1hPjc3ii16lImgomh/cP7Dj+M7GpgkSyb0kwUTBQ1xEqz25XoalKX4BM8rUyMwm T4aw== X-Gm-Message-State: AOAM5324iwiziEj6TfKzZA4g+UerKPHrShfJVkTDYbicFU/+/WMI8tEb Zwr4C0rJIYNNMRT8/QQeg55Nmg== X-Google-Smtp-Source: ABdhPJwaIaA5LWkXU2bI9EHMzmkLfCRXilEGefyf39wqr6S9rXXDL2MfT9aOGDnp3JfVHUiMkTxI0g== X-Received: by 2002:a17:902:7404:b029:e4:503b:f83d with SMTP id g4-20020a1709027404b02900e4503bf83dmr5209808pll.35.1616615557902; Wed, 24 Mar 2021 12:52:37 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id p1sm3283021pfn.22.2021.03.24.12.52.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 12:52:37 -0700 (PDT) Date: Wed, 24 Mar 2021 12:52:28 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: Tyler Retzlaff , dev@dpdk.org, david.marchand@redhat.com, bruce.richardson@intel.com, drc@linux.vnet.ibm.com Message-ID: <20210324125228.5dca333a@hermes.local> In-Reply-To: <11634428.8dEGKDZn2b@thomas> 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> <11634428.8dEGKDZn2b@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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, 24 Mar 2021 18:52:40 +0100 Thomas Monjalon wrote: > 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. > There should be some test for C++ application use of API. There doesn't appear to be one in the current CI suite.