* [DPDK/core Bug 1425] enable_stdatomic=true breaks C++ on GCC 11 and earlier
@ 2024-04-29 6:21 bugzilla
2024-04-29 23:14 ` Tyler Retzlaff
0 siblings, 1 reply; 4+ messages in thread
From: bugzilla @ 2024-04-29 6:21 UTC (permalink / raw)
To: dev
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
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 <rte_stdatomic.h>
from a C++ translation unit (e.g., app).
<rte_stdatomic.h> includes <stdatomic.h>, which in turn is not necessarily
C++-compatible.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #2: Type: text/html, Size: 2751 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [DPDK/core Bug 1425] enable_stdatomic=true breaks C++ on GCC 11 and earlier
2024-04-29 6:21 [DPDK/core Bug 1425] enable_stdatomic=true breaks C++ on GCC 11 and earlier bugzilla
@ 2024-04-29 23:14 ` Tyler Retzlaff
2024-04-30 20:06 ` Mattias Rönnblom
0 siblings, 1 reply; 4+ messages in thread
From: Tyler Retzlaff @ 2024-04-29 23:14 UTC (permalink / raw)
To: bugzilla; +Cc: dev
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 <rte_stdatomic.h>
> from a C++ translation unit (e.g., app).
>
> <rte_stdatomic.h> includes <stdatomic.h>, which in turn is not necessarily
> C++-compatible.
This is known but to add some information.
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.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [DPDK/core Bug 1425] enable_stdatomic=true breaks C++ on GCC 11 and earlier
2024-04-29 23:14 ` Tyler Retzlaff
@ 2024-04-30 20:06 ` Mattias Rönnblom
2024-04-30 20:37 ` Tyler Retzlaff
0 siblings, 1 reply; 4+ messages in thread
From: Mattias Rönnblom @ 2024-04-30 20:06 UTC (permalink / raw)
To: Tyler Retzlaff, bugzilla; +Cc: dev
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 <rte_stdatomic.h>
>> from a C++ translation unit (e.g., app).
>>
>> <rte_stdatomic.h> includes <stdatomic.h>, which in turn is not necessarily
>> C++-compatible.
>
> This is known but to add some information.
>
Is it also documented?
> 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 <stdatomic.h> which interoperates with C++ even in C++11-mode?
Or need the application be compiled as C++23.
>>
>> --
>> You are receiving this mail because:
>> You are the assignee for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [DPDK/core Bug 1425] enable_stdatomic=true breaks C++ on GCC 11 and earlier
2024-04-30 20:06 ` Mattias Rönnblom
@ 2024-04-30 20:37 ` Tyler Retzlaff
0 siblings, 0 replies; 4+ messages in thread
From: Tyler Retzlaff @ 2024-04-30 20:37 UTC (permalink / raw)
To: Mattias Rönnblom; +Cc: bugzilla, dev
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 <rte_stdatomic.h>
> >>from a C++ translation unit (e.g., app).
> >>
> >><rte_stdatomic.h> includes <stdatomic.h>, 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 <stdatomic.h> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-30 20:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-29 6:21 [DPDK/core Bug 1425] enable_stdatomic=true breaks C++ on GCC 11 and earlier bugzilla
2024-04-29 23:14 ` Tyler Retzlaff
2024-04-30 20:06 ` Mattias Rönnblom
2024-04-30 20:37 ` Tyler Retzlaff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).