[Cfp-interest] SNAN and thread storage
Fred J. Tydeman
tydeman at tybor.com
Thu Apr 19 15:15:18 PDT 2012
On Thu, 19 Apr 2012 09:51:51 -0700 (PDT) Fred J. Tydeman wrote:
>
>On Thu, 19 Apr 2012 09:26:49 -0700 (PDT) Fred J. Tydeman wrote:
>>
>>The description of SNAN on page 23/17 for 7.12#5 mentions
>>static initializer. What about thread storage?
>
>Jim wrote:
>>Please say more about the issue you see with thread storage.
>
>My understanding is thread storage is initialized from a static
>image created at translation time. So, a floating thread var
>initialized with an SNAN should be the same as a static var
>(and not like an auto var).
>
>
>How about replacing
>
>If a signaling NaN macro is used as a static initializer
>for an object of the same type, the object is initialized with a
>signaling NaN value.
>
>with
>
>If a signaling NaN macro is used as a static or thread initializer
>for an object of the same type, the object is initialized with a
>signaling NaN value.
Here is the words I have come up with after looking more at C11:
If a signaling NaN macro is used for initialization of an object that
has static or thread-local storage duration of the same type, the
object is initialized with a signaling NaN value.
---
Fred J. Tydeman Tydeman Consulting
tydeman at tybor.com Testing, numerics, programming
+1 (775) 358-9748 Vice-chair of PL22.11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.
More information about the Cfp-interest
mailing list