<div dir="ltr">P0907r1 proposes this addition relative to the WD:<div><br></div><div>> <span style="color:rgb(0,136,0);font-family:sans-serif;font-size:medium;text-decoration:underline">If overflow caused by an operation which would require representing an integer which cannot be represented by the type, the behavior is undefined.</span></div><div class="gmail_extra"><br></div><div class="gmail_extra">However, it simultaneously proposes these deletions relative to the WD:</div><div class="gmail_extra"><br></div><div class="gmail_extra">> <span style="color:rgb(255,0,0);font-family:sans-serif;font-size:medium;text-decoration:line-through">[</span><em style="color:rgb(255,0,0);font-family:sans-serif;text-decoration:line-through">Note:</em><span style="color:rgb(255,0,0);font-family:sans-serif;font-size:medium;text-decoration:line-through"> Operators can be regrouped according to the usual mathematical rules only where the operators really are associative or commutative </span>...</div><div class="gmail_extra">and</div><div class="gmail_extra">> <span style="color:rgb(0,0,0);font-family:sans-serif">an operation that would have undefined behavior as specified in Clause 4 through 19 of this document [</span><em style="color:rgb(0,0,0);font-family:sans-serif">Note</em><span style="color:rgb(0,0,0);font-family:sans-serif">: including, for example, </span><del style="font-family:sans-serif;color:red">signed integer overflow, </del><span style="color:rgb(0,0,0);font-family:sans-serif">certain pointer arithmetic, division by zero, or certain shift operations —</span><em style="color:rgb(0,0,0);font-family:sans-serif">end note</em><span style="color:rgb(0,0,0);font-family:sans-serif">]</span></div><div class="gmail_extra"><br></div><div class="gmail_extra">The removals are all non-normative, but they seem to be aimed at eliminating references to "signed overflow is UB", even though signed overflow <i>is</i> still UB. Was there a sense in the room that we wanted to downplay the importance of <i>teaching</i> signed UB in C++, but not actually eliminate the UB itself? Or what's the point of re-wording these existing notes?</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Also, separately and less importantly, I'd love to hear someone's rationale for making (1<<31) UB in C++2a when it's IDB in C++17. The straw poll result in P0907r1 sounds unambiguous, but I don't understand what rationale could exist for taking this construct from IDB into UB. Is the assumption that people haven't yet had a chance to write any programs whose correctness depends on the value of (1<<31), so if we change it back to UB fast enough, nobody will notice?</div><div class="gmail_extra"><br></div><div class="gmail_extra">–Arthur</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 16, 2018 at 8:56 AM, JF Bastien <span dir="ltr"><<a href="mailto:cxx@jfbastien.com" target="_blank">cxx@jfbastien.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello EWG,<div><br></div><div>SG6 and SG12 discussed <a href="http://wg21.link/P0907r0" target="_blank">wg21.link/P0907r0</a> Signed Integers are Two’s Complement and provided extensive feedback.</div><div><br></div><div>I've attached an updated paper listing polls and addressing most feedback (except some wording fiddle) to the EWG wiki for this afternoon's discussion:</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><a href="http://wiki.edg.com/pub/Wg21jacksonville2018/EvolutionWorkingGroup/D0907r1.html" target="_blank">http://wiki.edg.com/pub/<wbr>Wg21jacksonville2018/<wbr>EvolutionWorkingGroup/D0907r1.<wbr>html</a></div></blockquote><div><br></div><div>Thanks,</div><div><br></div><div>JF</div><div><br></div></div>
<br>______________________________<wbr>_________________<br>
ub mailing list<br>
<a href="mailto:ub@isocpp.open-std.org">ub@isocpp.open-std.org</a><br>
<a href="http://www.open-std.org/mailman/listinfo/ub" rel="noreferrer" target="_blank">http://www.open-std.org/<wbr>mailman/listinfo/ub</a><br>
<br></blockquote></div><br></div></div>