<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;"><div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">To address the action item from WG 14 how about we propose changing the second sentence in 6.6.1 #5 from:</div><div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">… <strike><font color="#ff2600">If a floating expression is evaluated in the translation environment, the arithmetic range and precision shall be at least as great as if the expression were being evaluated in the execution environment.</font></strike></div></div></blockquote><div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br></div><div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">to:</div><div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><br>… <font color="#669c35">A floating expression evaluated in the translation environment is evaluated with arithmetic range and precision at least as great as if the expression were being evaluated in the execution environment.</font></blockquote><div><div><br></div><div>with no addition to Annex J.</div><div><br></div><div>This avoids the “shall”, and hence the UB. It also clarifies that “arithmetic range and precision” pertains to the evaluation.</div><div><br></div><div>- Jim Thomas</div><div><br><blockquote type="cite"><div>On Mar 12, 2025, at 1:01 PM, RAJAN BHAKTA <rbhakta@us.ibm.com> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">Yes, that effort is underway with the UB study group and separately with Jens.<o:p></o:p></span></div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);">Regards,<br><br><b>Rajan Bhakta</b><br>z/OS XL C/C++ Compiler Technical Architect<br>ISO C Standards Representative (Canada, USA), INCITS/C Chair<br>C/C++ Compiler Development</span><span style="font-size: 10pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);"><o:p></o:p></span></div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);"><a href="mailto:rbhakta@us.ibm.com" style="color: blue; text-decoration: underline;"><span style="color: rgb(0, 120, 215);">rbhakta@us.ibm.com</span></a></span><span style="font-size: 10pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);"><o:p></o:p></span></div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);">IBM</span><span style="font-size: 10pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);"><o:p></o:p></span></div></div></div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div id="mail-editor-reference-message-container"><div><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; border-image: none; padding: 3pt 0in 0in;"><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"><b><span style="">From:<span class="Apple-converted-space"> </span></span></b><span style="">Jim Thomas <<a href="mailto:jaswthomas@sbcglobal.net" style="color: blue; text-decoration: underline;">jaswthomas@sbcglobal.net</a>><br><b>Date:<span class="Apple-converted-space"> </span></b>Wednesday, March 12, 2025 at 2:49</span><span style="font-family: Arial, sans-serif;"> </span><span style="">PM<br><b>To:<span class="Apple-converted-space"> </span></b>RAJAN BHAKTA <<a href="mailto:rbhakta@us.ibm.com" style="color: blue; text-decoration: underline;">rbhakta@us.ibm.com</a>><br><b>Cc:<span class="Apple-converted-space"> </span></b><a href="mailto:cfp-interest@oakapple.net" style="color: blue; text-decoration: underline;">cfp-interest@oakapple.net</a><span class="Apple-converted-space"> </span><<a href="mailto:cfp-interest@oakapple.net" style="color: blue; text-decoration: underline;">cfp-interest@oakapple.net</a>><br><b>Subject:<span class="Apple-converted-space"> </span></b>[EXTERNAL] Re: [cfp-interest 3410] [SC22WG14.29686] WG14 2025/02 meeting action item: CFP to look at N3447's change 3.2, addition 50'<o:p></o:p></span></p></div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 1pt; color: white;">The addition for (informative) Annex J is intended to be an implication of what is already in 6.</span><span style="font-size: 1pt; font-family: Arial, sans-serif; color: white;"> </span><span style="font-size: 1pt; color: white;">6.</span><span style="font-size: 1pt; font-family: Arial, sans-serif; color: white;"> </span><span style="font-size: 1pt; color: white;">1 #5. It, per se, shouldn't have any effect on what users can safely do. I think Joseph’s idea to change the “shall be” to “is” in 6.</span><span style="font-size: 1pt; font-family: Arial, sans-serif; color: white;"> </span><span style="font-size: 1pt; color: white;">6.</span><span style="font-size: 1pt; font-family: Arial, sans-serif; color: white;"> </span><span style="font-size: 1pt; color: white;">1 #5 (and<o:p></o:p></span></div></div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 1pt; color: white;"><o:p></o:p></span></div></div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">The addition for (informative) Annex J is intended to be an implication of what is already in 6.6.1 #5. It, per se, shouldn't have any effect on what users can safely do.<o:p></o:p></div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div></div><div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">I think Joseph’s idea to change the “shall be” to “is” in 6.6.1 #5 (and not add anything to Annex J) is reasonable. This suggests a broader effort to eliminate all uses of “shall” and “shall not” that apply to implementations instead of users. Rajan, did you say that effort was in progress?<o:p></o:p></div></div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div></div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">- Jim Thomas<o:p></o:p></div></div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><br><br><o:p></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">On Mar 12, 2025, at 9:49<span style="font-family: Arial, sans-serif;"> </span>AM, RAJAN BHAKTA <rbhakta@us.ibm.com> wrote:<o:p></o:p></div></div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div><div><div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">In case people are not on the WG14 reflector.</span><span style="font-size: 10pt;"><o:p></o:p></span></div></div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><span style="font-size: 10pt;"><o:p></o:p></span></div></div><div><div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33);">Regards,<br><br><b>Rajan Bhakta</b></span><span style="font-size: 10pt;"><o:p></o:p></span></div></div></div></div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><span style="font-size: 10pt;"><o:p></o:p></span></div></div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><span style="font-size: 10pt;"><o:p></o:p></span></div></div><div id="mail-editor-reference-message-container"><div><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-image: none; padding: 3pt 0in 0in; border-color: currentcolor;"><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"><b>From:<span class="apple-converted-space"> </span></b>owner-sc22wg14@open-std.org <owner-sc22wg14@open-std.org> on behalf of Joseph Myers <josmyers@redhat.com><br><b>Date:<span class="apple-converted-space"> </span></b>Wednesday, March 12, 2025 at 11:40<span style="font-family: Arial, sans-serif;"> </span>AM<br><b>To:<span class="apple-converted-space"> </span></b>RAJAN BHAKTA <rbhakta@us.ibm.com><br><b>Cc:<span class="apple-converted-space"> </span></b>ISO C <sc22wg14@open-std.org><br><b>Subject:<span class="apple-converted-space"> </span></b>[EXTERNAL] [SC22WG14.29686] WG14 2025/02 meeting action item: CFP to look at N3447's change 3.2, addition 50'<span style="font-size: 10pt;"><o:p></o:p></span></p></div><div><div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">On Wed, 12 Mar 2025, RAJAN BHAKTA wrote:<br><br>> We suggest using the following wording instead:<br>><span class="apple-converted-space"> </span><br>> (50’) A floating expression is evaluated in the translation environment<span class="apple-converted-space"> </span><br>> with less arithmetic range or precision than if the expression were<span class="apple-converted-space"> </span><br>> being evaluated in the execution environment.<br><br>The effect of that would seem to be that no program can safely use<span class="apple-converted-space"> </span><br>floating-point expressions in constant expressions at all, in case the<span class="apple-converted-space"> </span><br>implementation chooses to evaluate with less range or precision and so<span class="apple-converted-space"> </span><br>give them undefined behavior.<br><br>I think we need a demons or ghosts paper to replace this "shall be" (in<span class="apple-converted-space"> </span><br>6.6.1) by "is" (or some similar change), since if there is UB here, there<span class="apple-converted-space"> </span><br>should not be; the implementation should not be permitted to use less<span class="apple-converted-space"> </span><br>range or precision in the translation environment.<br><br>--<span class="apple-converted-space"> </span><br>Joseph S. Myers<br>josmyers@redhat.com</span><span style="font-size: 10pt;"><o:p></o:p></span></div></div></div></div></div></div></div><div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica;">_______________________________________________<br>cfp-interest mailing list<br></span><a href="mailto:cfp-interest@oakapple.net" style="color: blue; text-decoration: underline;"><span style="font-size: 9pt; font-family: Helvetica;">cfp-interest@oakapple.net</span></a><span style="font-size: 9pt; font-family: Helvetica;"><br></span><a href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest" style="color: blue; text-decoration: underline;"><span style="font-size: 9pt; font-family: Helvetica;">http://mailman.oakapple.net/mailman/listinfo/cfp-interest</span></a></div></div></blockquote></div></div></div></div></div></div></div></div></blockquote></div><br></div></div></div></body></html>