[Cfp-interest 2629] Re: [SC22WG14.22998] n3082 wording on page 4

Jim Thomas jaswthomas at sbcglobal.net
Mon Jan 23 10:19:02 PST 2023



> On Jan 22, 2023, at 7:05 PM, Jim Thomas <jaswthomas at sbcglobal.net> wrote:
> 
> 
> 
>> On Jan 22, 2023, at 4:44 PM, Damian McGuckin <damianm at esi.com.au> wrote:
>> 
>> 
>> Hi Jim.
>> 
>> I share your same concerns about both 'must' and 'is constrained to''  The first is scary and the second too long.
>> 
>> On Sun, 22 Jan 2023, Jim Thomas wrote:
>> 
>>>     But if it was just meant to indicate that this applies to any such
>>>     constant expression whenever it happens to be evaluated (in an
>>>     initializer) at translation time, the "must be" should just be
>>>     replaced by "is".
> 
> This is missing part of the thread. The remark is from Jen’s message, not mine. I didn’t respond to this part because it’s not what was meant.

For example, for

auto double x = DBL_SNAN;

an implementation that does same-type assignment by conversion could, provided FENV_ACCESS “on" is not in effect, do the conversion at translation-time as an optimization and store a quiet NaN in x. The requirement in 5.2.4.2.2 #21 is not intended to apply in this case. So just being evaluated at translation-time isn’t sufficient.

- Jim Thomas

> 
>> 
>> That sounds like a great solution. Simpler. 2 letters.
> 
> Simpler, but not what was intended.
> 
>> 
>> Correct my if I am wrong. The context is 5.2.4.2.2 #21. From the CD document, this is
>> 
>> 	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.
>> 
>> Will this now read as ...
>> 
>> 	If an optional unary + or - operator followed by a signaling NaN
>> 	macro is used as the initializer (that is evaluated at translation
>> 	time) for initializing an object of the same type that has static
>> 	or thread storage duration, the object is initialized with a
>> 	signaling NaN value.
>> 
>> Or am I missing something.
> 
> See above.
> 
> - Jim Thomas
>> 
>> `Regards - Damian
>> 
>> Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
>> Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
>> Views & opinions here are mine and not those of any past or present employer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20230123/954a5c63/attachment-0001.htm>


More information about the Cfp-interest mailing list