C++ Logo

SG12

Advanced search

Subject: Re: [ub] [isocpp-lib] bit_cast and indeterminate values
From: Richard Smith (richardsmith_at_[hidden])
Date: 2019-06-20 17:36:44


[+SG12]

On Thu, Jun 20, 2019 at 3:11 PM Richard Smith <richardsmith_at_[hidden]>
wrote:

> On Thu, Jun 20, 2019 at 2:25 PM Ville Voutilainen <
> ville.voutilainen_at_[hidden]> wrote:
>
>> On Fri, 21 Jun 2019 at 00:22, Richard Smith via Lib
>> <lib_at_[hidden]> wrote:
>> >
>> > As currently specified, bit_cast from an indeterminate value produces
>> an unspecified value rather than an indeterminate value. That means this
>> can't be implemented by a simple load on some implementations, and instead
>> will require some kind of removing-the-taint-of-an-uninitialized-value
>> operation to be performed. (A similar concern applies to reading from
>> padding bits.)
>> >
>> > Is that the intent?
>>
>> With all due respect, Sir Richard, when asking for intent, aren't you
>> missing some audiences? Such as the proposal author,
>>
>
> I was mostly looking for "Is my understanding of the wording in line with
> the expectations of the wording groups that produced it?"-level intent, but
> you're quite right that I should have included at least JF. Thanks.
>
> and the memory-model folks?
>>
>
> I must admit that I'm not sure what this has to do with SG1; indeterminate
> values are a core object model thing, not a concurrency/parallelism thing.
> (SG12, maybe.)
>



SG12 list run by herb.sutter at gmail.com