<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Fri, 16 Mar 2018, 14:20 Arthur O'Dwyer, <<a href="mailto:arthur.j.odwyer@gmail.com">arthur.j.odwyer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">(Dropped some marginally relevant lists I get mod-queued on anyway)<div><br></div><div>> <span style="font-size:12.800000190734863px">The notes should help clarify RIchard's rationale for proposing this.</span></div><div><br></div><div><a href="http://wiki.edg.com/bin/view/Wg21jacksonville2018/Sg6P0907R0" target="_blank" rel="noreferrer">http://wiki.edg.com/bin/view/Wg21jacksonville2018/Sg6P0907R0</a> has some discussion from Richard (Smith?) about (1<<32) needing to remain IDB-at-best on x86 platforms (Ctrl+F "crypto"). Total agreement on that front.</div><div>I don't see any notes on that page which are relevant to (1<<31) — there's just the straw poll results with zero prior discussion notated.</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">My rationale for wanting *some* change here is that the status quo is inconsistent, and satisfies neither the "<< means multiplication" nor the "<< means bit shift" perspective. I want one or the other, or a really good reason for the status quo.</div><div dir="auto"><br></div><div dir="auto">And, FWIW, the bit shift option was my preference.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><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">Shifting out of range (1 << 31) as currently defined (if shift has defined value when interpreted as unsigned, you get the value as signed, you can dhigt into but not past the sign, shifting past sign bit is UB), 1<<31 was defined and still is (as of Howard's paper), 2<<31 was UB and still is, WG14 is currently considering whether to adopt Howard's paper which made this. Should we take it back to undefined to do 1<<31?<br>SS F N A SA<br>2 7 5 1 1</blockquote></div><div><br></div><div>Am I looking at the wrong page, perhaps?</div><div><br></div><div>Thanks,<br></div><div>Arthur</div><div><br></div><div><div>P.S. — Alternatively, since 0x80000000 is allowed to be a trap representation in P0907r1 but 0xC0000000 is not, perhaps the intent of this straw poll was that 1<<31 should be UB but 3<<30 should be well-defined. That would be extra weird, though, so I hope that's not what happened.</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 16, 2018 at 11:06 AM, JF Bastien <span dir="ltr"><<a href="mailto:cxx@jfbastien.com" target="_blank" rel="noreferrer">cxx@jfbastien.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Fri, Mar 16, 2018 at 2:04 PM, Arthur O'Dwyer <span dir="ltr"><<a href="mailto:arthur.j.odwyer@gmail.com" target="_blank" rel="noreferrer">arthur.j.odwyer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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></blockquote><div><br></div></span><div>There was extensive discussion of this note, what to add / remove, etc, and no direction as to where to go. I'll ask EWG today.</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><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></blockquote><div><br></div></span><div>The notes should help clarify RIchard's rationale for proposing this.</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><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"><div><div class="m_-6694506343368603307m_2944910437192608185h5">On Fri, Mar 16, 2018 at 8:56 AM, JF Bastien <span dir="ltr"><<a href="mailto:cxx@jfbastien.com" target="_blank" rel="noreferrer">cxx@jfbastien.com</a>></span> wrote:<br></div></div><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><div class="m_-6694506343368603307m_2944910437192608185h5"><div dir="ltr">Hello EWG,<div><br></div><div>SG6 and SG12 discussed <a href="http://wg21.link/P0907r0" target="_blank" rel="noreferrer">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" rel="noreferrer">http://wiki.edg.com/pub/Wg21jacksonville2018/EvolutionWorkingGroup/D0907r1.html</a></div></blockquote><div><br></div><div>Thanks,</div><div><br></div><div>JF</div><div><br></div></div>
<br></div></div>_______________________________________________<br>
ub mailing list<br>
<a href="mailto:ub@isocpp.open-std.org" target="_blank" rel="noreferrer">ub@isocpp.open-std.org</a><br>
<a href="http://www.open-std.org/mailman/listinfo/ub" rel="noreferrer noreferrer" target="_blank">http://www.open-std.org/mailman/listinfo/ub</a><br>
<br></blockquote></div><br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div>
_______________________________________________<br>
ub mailing list<br>
<a href="mailto:ub@isocpp.open-std.org" target="_blank" rel="noreferrer">ub@isocpp.open-std.org</a><br>
<a href="http://www.open-std.org/mailman/listinfo/ub" rel="noreferrer noreferrer" target="_blank">http://www.open-std.org/mailman/listinfo/ub</a><br>
</blockquote></div></div></div>