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 7178943F56; Tue, 30 Apr 2024 22:37:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4356C40262; Tue, 30 Apr 2024 22:37:17 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 739AD4025C; Tue, 30 Apr 2024 22:37:15 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id C19AC21112E1; Tue, 30 Apr 2024 13:37:14 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C19AC21112E1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1714509434; bh=nZ5/bB3V2ztsK149tEgQCWeX/16+Ff2U35c5HSTw+lA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eV0lr7MHRDVTcP7BgWxWgxDTZMFBtRUsQpuyvWV8DaM8VOCVEleG84MXrJOn8tzLS /8VeRBtBMmqP4i+Yljk+rMYQm6yc5kUd6/gZTApEBq+NwsDWOfP53jnxmL3fUEH/xM aLI7rhoRHyfEti4w1bB4C8edCLhsgdA/TK8R7VYA= Date: Tue, 30 Apr 2024 13:37:14 -0700 From: Tyler Retzlaff To: Mattias =?iso-8859-1?Q?R=F6nnblom?= Cc: bugzilla@dpdk.org, dev@dpdk.org Subject: Re: [DPDK/core Bug 1425] enable_stdatomic=true breaks C++ on GCC 11 and earlier Message-ID: <20240430203714.GA7142@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20240429231458.GB17852@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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 On Tue, Apr 30, 2024 at 10:06:08PM +0200, Mattias Rönnblom wrote: > On 2024-04-30 01:14, Tyler Retzlaff wrote: > >On Mon, Apr 29, 2024 at 06:21:13AM +0000, bugzilla@dpdk.org wrote: > >>https://bugs.dpdk.org/show_bug.cgi?id=1425 > >> > >> Bug ID: 1425 > >> Summary: enable_stdatomic=true breaks C++ on GCC 11 and > >> earlier > >> Product: DPDK > >> Version: 23.11 > >> Hardware: All > >> OS: Linux > >> Status: UNCONFIRMED > >> Severity: normal > >> Priority: Normal > >> Component: core > >> Assignee: dev@dpdk.org > >> Reporter: mattias.ronnblom@ericsson.com > >> Target Milestone: --- > >> > >>On GCC 11 and earlier, configuring enable_stdatomic=true prevents the use of > >>all DPDK header files that directly or indirectly include > >>from a C++ translation unit (e.g., app). > >> > >> includes , which in turn is not necessarily > >>C++-compatible. > > > >This is known but to add some information. > > > > Is it also documented? we don't document anything about C++ right now including minimum compiler requirements or -std. i agree we probably should, if i find cycles i'll see if i can provide some text. > > >C++ and enable_stdatomic=true for llvm and gcc are not currently > >supported. the combination will remain unsupported for C++ compilers > >that do not support -std=c++23 which is the first C++ standard that > >requires interoperability with C11 stdatomic.h > > >When enable_stdatomic=true there are bugs/incorrect usages of atomic > >qualifier in casts that (even when using C++23) cause compilation > >failure. These are a fixable but are low priority without -std=c++23. > > > >Finally, the legacy atomics remain unconverted to stdatomic. This will > >cause enable_stdatomic=true not to build when using llvm (but not gcc) > >because llvm strictly enforces qualification when using atomic generics. > > > > OK, I see. It'll be a while until enable_stdatomic is usable outside > Windows then, for generic builds. > > Am I right if I say that C++23-capable compilers/run-times are > supposed to have a which interoperates with C++ even > in C++11-mode? Or need the application be compiled as C++23. the application will need to be compiled with -std=C++23 though i think llvm does have a stdatomic.h that may work with lower -std, gcc does not last i checked. in general i think (as you found with _Generic) the compiler vendors are limiting leaking of C into C++ and vice versa where it is not explicitly intended to operate in one language or the other. i'll be looking into this more beyond 24.07 since there is work to do even consuming with msvc that is not upstream. > > >> > >>-- > >>You are receiving this mail because: > >>You are the assignee for the bug.