C++ Logo

sg5

Advanced search

Re: Intent of implementation-defined case of thread local dynamic init evaluated by atomic block?

From: Hubert Tong <hubert.reinterpretcast_at_[hidden]>
Date: Fri, 15 Jul 2022 10:19:10 -0400
On Fri, Jul 15, 2022 at 3:36 AM Jens Maurer <Jens.Maurer_at_[hidden]> wrote:

> On 15/07/2022 02.20, Hubert Tong via SG5 wrote:
> > In DTS 12907, 8.8 [stmt.tx] paragraph 6, bullet 6.7:
> >
> > * dynamic initialization of a variable with thread storage duration.
> >
> > Is this intended to cover the case where the dynamic initialization for
> a non-local variable of thread storage duration is evaluated within the
> atomic block because the initialization was deferred
> ([basic.start.dynamic]) and can be deferred no further?
>
> This is primarily concerned with local variables with thread storage
> duration,
> where we have express synchronization effects.
>
> However, it seems safer to exclude such dynamic initialization in general
> (as the wording implies).
>

Would you entertain a core issue to add a note to clarify that the wider
scope is as intended?


>
> Jens
>
>

Received on 2022-07-15 14:19:39