<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 2, 2020, 18:59 Tom Honermann &lt;<a href="mailto:tom@honermann.net">tom@honermann.net</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div>
    <div>On 7/2/20 12:32 PM, Corentin via SG16
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr"><br>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Thu, 2 Jul 2020 at 17:50,
            Tom Honermann &lt;<a href="mailto:tom@honermann.net" target="_blank" rel="noreferrer">tom@honermann.net</a>&gt; wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <div>On 7/2/20 3:31 AM, Corentin via SG16 wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div dir="ltr"><br>
                  </div>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr" class="gmail_attr">On Thu, 2 Jul 2020
                      at 09:09, Corentin &lt;<a href="mailto:corentin.jabot@gmail.com" target="_blank" rel="noreferrer">corentin.jabot@gmail.com</a>&gt;
                      wrote:<br>
                    </div>
                    <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                      <div dir="ltr">Hello,
                        <div>As part of <a href="https://wg21.link/p2178r0" target="_blank" rel="noreferrer">https://wg21.link/p2178r0</a>,</div>
                        <div><br>
                        </div>
                        <div>I would like to make *wide* characters
                          litteral with multiple c-char (ie: L&#39;abc&#39;)
                          ill-formed</div>
                        <div><a href="https://compiler-explorer.com/z/MHExrk" target="_blank" rel="noreferrer">https://compiler-explorer.com/z/MHExrk</a> <br>
                        </div>
                      </div>
                    </blockquote>
                    <div><br>
                    </div>
                    <div>I forgot to mention that it&#39;s extra fun with
                      combining characters <a href="https://compiler-explorer.com/z/ndyyAD" target="_blank" rel="noreferrer">https://compiler-explorer.com/z/ndyyAD</a> 
                      (the value of b is equivalent to L&#39;e\u0301&#39;)</div>
                  </div>
                </div>
              </blockquote>
              In both of the compiler-explorer examples, the options to
              the MSVC compiler are incorrect; they should be &#39;/O2&#39; and
              &#39;/utf-8&#39; respectively (though I don&#39;t think it affects the
              results for these cases).<br>
              <blockquote type="cite">
                <div dir="ltr">
                  <div class="gmail_quote">
                    <div> </div>
                    <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                      <div dir="ltr">
                        <div><br>
                        </div>
                        <div>All compilers but MSVC emit a warning
                          by default, some implementations pick the
                          first c-char, others pick the last.</div>
                        <div>There is no use (no occurrence in any of
                          the packages in vcpkg) or usage for this
                          feature.</div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </blockquote>
              <p>Did you check for cases like <tt>_TEXT(&#39;xx&#39;)</tt>, <tt>_T(&#39;xx&#39;)</tt>,
                and <tt>__T(&#39;xx&#39;)</tt> in addition to <tt>L&#39;xx&#39;</tt>?</p>
              <p>Regardless, the packages in the vcpkg ecosystem can
                prove that a feature is used, but cannot prove that a
                feature is not used.<br>
              </p>
            </div>
          </blockquote>
          <div>Sure, but that is not achievable. It&#39;s nevertheless a
            reasonable proxy. <br>
          </div>
        </div>
      </div>
    </blockquote>
    I agree it isn&#39;t achievable.  But we should be cautious about false
    negatives.<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Sure?</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>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_quote">
          <div><br>
          </div>
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <p> </p>
              <blockquote type="cite">
                <div dir="ltr">
                  <div class="gmail_quote">
                    <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                      <div dir="ltr">
                        <div><br>
                        </div>
                        <div>So why do this?</div>
                        <div>- Someone unfamiliar with C++ might do auto
                          str = L&#39;abc&#39; instead of L&quot;abc&quot;</div>
                        <div>- Things that are not useful should not
                          linger for 40 more years in the standard;  Tom
                          and I talked too much about how to word this
                          &quot;feature&quot; as part of P2029, so it&#39;s not free.</div>
                        <div>- It&#39;s part of a wider &quot;Bogus conversions
                          in phase 5&quot; should be ill-formed rather than
                          doing their best to compile *something*</div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </blockquote>
              P2029 makes these explicitly conditionally-supported in
              order to, as I understand it, match the C standard (in the
              C standard, my understanding is that
              implementation-defined semantics can include rejecting the
              code, but in the C++ standard, we use
              conditionally-supported for the same allowance). 
              Therefore, implementations are not (will not be) required
              to accept them with current direction.<br>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>I know. I don&#39;t think that&#39;s sufficient.</div>
        </div>
      </div>
    </blockquote>
    For what reason?  We&#39;ve lived with this for a very long time.  Why
    is there urgency now to spend time on this?  (When embarking on
    P2029, I had no intention of doing anything with these, but the
    direction to basically rewrite [lex.ccon] and [lex.string] made that
    unavoidable).<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">There is no _urgency_ , there is also no time like the present.</div><div dir="auto">I doesn&#39;t have to take a lot of committee time. Either we think it is a useful feature of we don&#39;t</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>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_quote">
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div class="gmail_quote">
                    <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                      <div dir="ltr">
                        <div><br>
                        </div>
                        <div>Please note that I am not proposing to make
                          (narrow) multi character literals ill-formed
                          or deprecated at this point, there are some
                          uses, and these uses are intended.</div>
                        <div><br>
                        </div>
                        <div>I would really like your opinion so we can
                          propose that change to EWG and make the change
                          without taking too much of anyone&#39;s time (the
                          process really isn&#39;t tuned for very small
                          changes, which is why that is part of a larger
                          paper)</div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </blockquote>
              <p>I am weakly against for three reasons:</p>
              <ol>
                <li>I think there are more valuable efforts for us to
                  spend our time on.  I don&#39;t find the motivation above
                  compelling.  These are legacy features that, as far as
                  I am aware, don&#39;t actively cause problems.  If
                  evidence can be found to demonstrate that they do
                  actively cause problems, then I might change my mind.</li>
              </ol>
            </div>
          </blockquote>
          <div> I don&#39;t think that&#39;s ever a compelling reason not to do
            something</div>
        </div>
      </div>
    </blockquote>
    One of the first questions asked in the incubator groups is whether
    to devote more time to something.  In my opinion, this doesn&#39;t reach
    the bar for spending more time on it.<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Do we need to spend time on it?</div><div dir="auto">If we don&#39;t remove it now, we will deal with it in 40 years.</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>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <ol>
                <li> <br>
                </li>
                <li>Existing compilers are unlikely to change their
                  behavior.  Clang, gcc, and icc already issue warnings
                  for use of multicharacter literals (both ordinary and
                  wide) and I suspect they would continue to accept
                  these as extensions (even in their strict compliance
                  modes).  The cumulative affect of the proposed change
                  seems to be to require MSVC to issue a warning.<br>
                </li>
              </ol>
            </div>
          </blockquote>
          <div>Why do you think that?</div>
        </div>
      </div>
    </blockquote>
    As you&#39;ve mentioned elsewhere, making them ill-formed only requires
    emitting a warning; which most implementations appear to already
    do.  I see little motivation for them to do otherwise.  Users can
    already elevate that warning to an error via -Werror.<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">You assume compilers care about this extension?</div><div dir="auto">Do you think msvc should not to have to emit a diagnostic.</div><div dir="auto">The question is rather simple. Do we believe it is a useful feature?</div><div dir="auto">If we assume that compiler won&#39;t implement any paper there is no point standardizing anything.</div><div dir="auto">What do you think the correct behavior is?</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>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_quote">
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <ol>
                <li> <br>
                </li>
                <li>Requiring a diagnostic creates an unnecessary
                  divergence from C.</li>
              </ol>
            </div>
          </blockquote>
          <div> I am sure C would consider aligning.</div>
        </div>
      </div>
    </blockquote>
    <p>I&#39;m sure they would consider it, but I&#39;m not at all sure that
      they would choose to do so.  WG14 tends to be more conservative
      than WG21.</p>
    <p>Tom.</p>
    <p><br>
    </p>
  </div>

</blockquote></div></div></div>

