C++ Logo

liaison

Advanced search

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

From: Martin Uecker <ma.uecker_at_[hidden]>
Date: Thu, 02 May 2024 20:16:56 +0200
Am Donnerstag, dem 02.05.2024 um 20:47 +0300 schrieb Ville Voutilainen:
> On Thu, 2 May 2024 at 20:44, Martin Uecker via Liaison
> <liaison_at_[hidden]> wrote:
>
> > The two problems we discussed for C were
> >
> > 1. even when we require those stores (I see no problem there),
> > it is difficult to make sure that the information does not
> > leak in a different way, e.g. because registers or other
> > stack area are not cleared. WG14 was content with making the
> > intent clear.
>
> We have Recommended Practice that we can use for the intent.

Yes.

>
> > 2. if there is UB afterwards then the extreme interpretation
> > of UB (which WG14 later rejected) makes the complete program have
> > no meaning.
>
> 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.

Martin

Received on 2024-05-02 18:17:00