<div dir="ltr">Thanks Tom &amp; Jens, submitted with your proposed change: <a href="https://github.com/cplusplus/CWG/issues/230">https://github.com/cplusplus/CWG/issues/230</a><div><br></div><div>Fraser</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 26 Jan 2023 at 12:45, Tom Honermann via Std-Proposals &lt;<a href="mailto:std-proposals@lists.isocpp.org">std-proposals@lists.isocpp.org</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>
    <p>Ha! Despite it looking very much like I just copied and resent
      essentially the same thing Jens did two minutes earlier, I swear I
      didn&#39;t! :)<br>
    </p>
    <p>Tom.<br>
    </p>
    <div>On 1/26/23 12:44 PM, Tom Honermann via
      Std-Proposals wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div>On 1/26/23 12:23 PM, Fraser Gordon
        via Std-Proposals wrote:<br>
      </div>
      <blockquote type="cite">
        
        <div dir="ltr">Hi folks,
          <div><br>
          </div>
          <div>I was reading the [lex.ccon] section of the current draft
            and noticed an oddity in the <a href="https://eel.is/c++draft/lex.ccon#nt:hexadecimal-escape-sequence" target="_blank">hexadecimal-escape-sequence</a>
            production:</div>
          <div><br>
          </div>
          <div>
            <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
              <div><i>hexadecimal-escape-sequence:</i></div>
            </blockquote>
          </div>
          <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
            <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">\x <i>hexadecimal-digit-sequence</i><br>
              <i>hexadecimal-escape-sequence hexadecimal-digit</i><br>
              \x{ <i>simple-hexadecimal-digit-sequence</i> }<br>
              <br>
            </blockquote>
          </blockquote>
          The combination of the 2nd and 3rd rules seems to say that
          \x{20}20 should be parsed as a hex escape sequence (presumably
          representing u+2020). Octal doesn&#39;t have this issue as <i>octal-escape-sequence</i> doesn&#39;t
          have a recursive definition.
          <div><br>
          </div>
          <div>I tried this on Godbolt. GCC and Clang interpret
            &#39;\x{20}20&#39; as a multicharacter literal and &quot;\x{20}{20}&quot; as
            the string &quot; 20&quot;. MSVC and icc appear not to support \x{}.</div>
          <div><br>
          </div>
          <div>I&#39;d guess this isn&#39;t intentional as it would defeat the
            purpose of having \x{} sequences? At least two
            implementations seem to agree.<br>
          </div>
        </div>
      </blockquote>
      <p>Good catch!</p>
      <p>I think we want:<i><br>
        </i></p>
      <blockquote>
        <p><font face="monospace"><i>hexadecimal-escape-sequence:</i><br>
            <i>    </i>\x <i><font color="#ff0000"><strike>hexadecimal-digit-sequence</strike></font><font color="#2ec27e"><u>simple-hexadecimal-digit-sequence</u></font>
            </i><i><br>
                  <font color="#ff0000"><strike>hexadecimal-escape-sequence
                  hexadecimal-digit</strike></font></i><br>
            <i>    </i>\x{ <i>simple-hexadecimal-digit-sequence</i> }</font></p>
      </blockquote>
      <p>Would you be so kind as to file a CWG issue at <a href="https://github.com/cplusplus/CWG" target="_blank">https://github.com/cplusplus/CWG</a>?<br>
      </p>
      <p>Tom.<br>
      </p>
      <blockquote type="cite">
        <div dir="ltr">
          <div><br>
          </div>
          <div>Fraser</div>
        </div>
        <br>
        <fieldset></fieldset>
      </blockquote>
      <br>
      <fieldset></fieldset>
    </blockquote>
  </div>

-- <br>
Std-Proposals mailing list<br>
<a href="mailto:Std-Proposals@lists.isocpp.org" target="_blank">Std-Proposals@lists.isocpp.org</a><br>
<a href="https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals" rel="noreferrer" target="_blank">https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals</a><br>
</blockquote></div>

