C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] Atomics papers

From: Uecker, Martin <Martin.Uecker_at_[hidden]>
Date: Wed, 10 Feb 2021 08:29:18 +0000
Am Mittwoch, den 10.02.2021, 07:43 +0100 schrieb Martin Uecker:
> Am Dienstag, den 09.02.2021, 15:36 -0800 schrieb Hans Boehm via Liaison:
> > On Tue, Feb 9, 2021 at 2:57 PM Joseph Myers via Liaison <
> > liaison_at_[hidden].org> wrote:
> > A further complication (or simplification, depending on how you look at it)
> > is that the ABI story here is currently badly broken for everything but
> > simple types with size == alignment. The upside is that we can probably
> > change more than one might expect, so long as we leave the simple (and by
> > far most common) case alone. Everything else is largely broken and
> > hopefully unused anyway.
> >
> > All of which is an argument to properly discuss this at a meeting ...

https://godbolt.org/z/5jo3aY


Here is a godbolt link for a test program. I tested only x86 on gcc/clang/icc
and ABI is already broken. For basic types it works. For complex float/double
alignment changes. Atomic struct types are not supported in ICC at all
and ABI is inconsistent between GCC C / GCC C++ / clang C++ on the one
side and clang C on the other (so also between clang C and C++!).

So yes, a complete desaster.

Best,
Martin


Received on 2021-02-10 02:29:25