[Cfp-interest 2610] Re: [SC22WG14.22886] N3071 exactly representable

Jₑₙₛ Gustedt jens.gustedt at inria.fr
Sat Jan 14 00:52:29 PST 2023


Jim,

on Fri, 13 Jan 2023 16:27:55 -0800 you (Jim Thomas
<jaswthomas at sbcglobal.net>) wrote:

> Right. the statement and example are not consistent. 
> 
> 5.2.4.2.2 #21 says "If an optional unary + or − operator followed by
> a signaling NaN macro is used as the initializer for initializing an
> object of the same type that has static or thread storage duration,
> the object is initialized with a signaling NaN value.” I believe this
> applies to initialization of parts of a complex object. If so, the
> example should be:
> 
> constexpr double _Complex dc1 = DBL_SNAN; // ok
> 
> One problem here is that 5.2.4.2.2 #21 doesn’t cover constexpr but
> that should be fixed, e.g. by inserting “or that is declared with
> storage-class specifier constexpr” after "that has static or thread
> storage duration” (as has been proposed to accommodate constexpr in
> other place).

good catch

What is a bit puzzling about all these cases is that this text stands
there for an indirect consequence, and not for real thing, namely the
question when that initalization expression is actually
evaluated. What is really meant here is "if the initializer is
evaluated before program startup" or "is evaluated at translation
time" or something like that.

It seems that we are missing a bit of terminology, here.

Thanks
Jₑₙₛ

-- 
:: ICube :::::::::::::::::::::::::::::: deputy director ::
:: Université de Strasbourg :::::::::::::::::::::: ICPS ::
:: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus ::
:: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 ::
:: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20230114/f2e97ddb/attachment.asc>


More information about the Cfp-interest mailing list