<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br><div><br><blockquote type="cite"><div>On Jan 6, 2023, at 12:50 PM, Joseph Myers <joseph@codesourcery.com> wrote:</div><br class="Apple-interchange-newline"><div><div>On Fri, 6 Jan 2023, Jim Thomas wrote:<br><br><blockquote type="cite">Here’s a draft for the CFP responses for NB comments on the C23 CD. The <br>responses are based on our review at the two CFP teleconferences this <br>week (January 4 and 5). Also, I have included a response with a proposal <br>for the issues raised in N3071.<br><br>Please review the paper and send any corrections or additions ASAP. Give <br>special attention to the section “About N3071”, much of which was <br>written after the CFP review meetings. I plan to update the draft, <br>incorporating your input, and submit it to WG14 on Monday, January 9.<br><br>https://wiki.edg.com/pub/CFP/WebHome/CFP_review_of_NB_comments-20230106.pdf<br></blockquote><br>GB-164: I'll disagree with the disagreement here (I assume this will end <br>up needing to be discussed in the WG14 meeting), since the semantic change <br>in C2x (which I don't think was ever explicitly discussed as an intended <br>semantic change in a paper) would make errno-setting implementations of <br>various functions much more complicated and less efficient - detecting <br>overflow after the fact (in a way that's valid for previous versions of C) <br>by checking for an infinite results from finite arguments is very <br>straightforward, determining based on the arguments whether pow, fdim, <br>hypot or fma (for example) would overflow / whether a result of the <br>largest finite value is an overflow is much more complicated and <br>inefficient (and saving and restoring exceptions so as to test, for the <br>purposes of errno setting, whether the overflow exception was raised, is <br>also inefficient; such explicit manipulations of floating-point state are <br>liable to empty the processor pipeline).  (This concern is specifically <br>about errno setting rather than exceptions; ensuring the overflow <br>exception is raised for overflow to a finite number isn't a problem in the <br>same way.  </div></div></blockquote><div><br></div>Could you determine overflow errno setting from the overflow floating-point exception?</div><div><br><blockquote type="cite"><div><div>So I'd be fine with applying the GB-164 change only for errno <br>and not for exceptions.)<br></div></div></blockquote><div><br></div>That might be a reasonable compromise if the benefit of the change to errno isn't worth the cost.<br><blockquote type="cite"><div><div><br>GB-279: The wording of some of the changes isn't quite right (constexpr <br>isn't a storage *duration*, so wording shouldn't refer to it as such in <br>F.8.4 or F.8.5).<br></div></div></blockquote><div><br></div><div>Rewordings might be:</div><div><br></div><div><p class="ISOSecretObservations" style="margin: 3pt 0in; line-height: 10.5pt; font-size: 9pt; font-family: Arial, sans-serif;"><span style="font-size: 10pt; font-family: Cambria, serif; background-color: yellow;">In F.8.4 #1 change “for an object that has static or thread storage duration” to “for an object declared with storage-class specifier constexpr, static, or thread_local”.</span><span style="font-size: 10pt; font-family: Cambria, serif;"><o:p></o:p></span></p><p class="ISOSecretObservations" style="margin: 3pt 0in; line-height: 10.5pt; font-size: 9pt; font-family: Arial, sans-serif;"><span style="font-size: 10pt; font-family: Cambria, serif; background-color: rgb(255, 255, 255);"><br></span></p><p class="ISOSecretObservations" style="margin: 3pt 0in; line-height: 10.5pt; font-size: 9pt; font-family: Arial, sans-serif;"><span style="font-size: 10pt; font-family: Cambria, serif; background-color: rgb(255, 255, 255);">and </span></p><p class="ISOSecretObservations" style="margin: 3pt 0in; line-height: 10.5pt; font-size: 9pt; font-family: Arial, sans-serif;"><span style="font-size: 10pt; font-family: Cambria, serif; background-color: rgb(255, 255, 255);"><br></span></p></div><p class="ISOSecretObservations" style="margin: 3pt 0in; line-height: 10.5pt; font-size: 9pt; font-family: Arial, sans-serif;"><span style="font-size: 10pt; font-family: Cambria, serif; background-color: yellow;">In F.8.5 #1 change “of objects that have static or thread storage duration” to “of objects declared with storage-class specifier constexpr, static, or thread_local”.</span><span style="font-size: 10pt; font-family: Cambria, serif;"><o:p></o:p></span></p><blockquote type="cite"><div><div><br>N3071: "shall have the same type as the initializer" isn't quite right; <br>the constexpr object is always (implicitly) const, but the initializer <br>isn't because it's an rvalue, so it should rather be that the unqualified <br>versions of the types are compatible (compatible is the usual notion, not <br>same).  And I'd tend to expect a real sNaN to be suitable for initializing <br>an object of the corresponding complex type (but not a different complex <br>type), since no conversion is then applied to the real part - although I <br>don't think any existing normative specification requires that to produce <br>(sNaN, +0) as the result.<br></div></div></blockquote><div><br></div><div>Maybe</div><div><br></div><div><span style="background-color: yellow;"><font face="Cambria, serif" size="2">“ … If the initializer has real type and a signaling NaN value,</font></span><span style="font-size: 10pt; font-family: Cambria, serif;"> <span style="background-color: yellow;">the unqualified versions of the type of the initializer and the corresponding real type of the object declared shall be compatible</span>.”</span><span style="font-family: -webkit-standard; font-size: medium;"></span></div><div><span style="font-size: 10pt; font-family: Cambria, serif;"><br></span></div><div><p class="MsoNormal" style="margin: 0in; font-size: medium; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: Cambria, serif;">The above leaves behavior of signaling NaNs unspecified in generally valid cases involving complex and imaginary types. The behavior of signaling NaNs for complex and imaginary types is generally unspecified or sketchily specified.<o:p></o:p></span></p><p class="MsoNormal" style="margin: 0in; font-size: medium; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: Cambria, serif;"><br></span></p><p class="MsoNormal" style="margin: 0in; font-size: medium; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: Cambria, serif;">- Jim Thomas</span></p></div><br><blockquote type="cite"><div><div><br>-- <br>Joseph S. Myers<br>joseph@codesourcery.com</div></div></blockquote></div><br></body></html>