C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] Rebasing C++ to C23

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Thu, 2 May 2024 21:21:36 +0300
On Thu, 2 May 2024 at 21:19, Ville Voutilainen
<ville.voutilainen_at_[hidden]> wrote:
>
> On Thu, 2 May 2024 at 21:16, Martin Uecker <ma.uecker_at_[hidden]> wrote:
>
> > > That's a separable problem (because we have a separate proposal for an
> > > optimization barrier),
> > > but if it's a volatile write, it's an optimization barrier because the
> > > volatile write is an observable effect.
> > > So I don't think this is a problem.
> >
> > If UB makes a program have no semantics at all, it is impossible
> > to define a barrier.
> >
> > If one accepts that UB can not affect previous observable behavior,
> > then all is well, but the C++ standard states the opposite last
> > time I checked.
>
> That's why https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1494r2.html
> changes those statements.

..but yes, you are correct in the sense that we would additionally
need to make volatile writes
be such observable checkpoints, which is an approach that I think
Davis is considering for
a revision of that proposal.

Received on 2024-05-02 18:21:49