<div dir="ltr">On Tue, Sep 24, 2013 at 9:14 AM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    gcc and MSVC both intentionally* retain the language linkage, and
    they accept both test cases in the PR.<br>
    <br>
    I already explained in PR17337 why this special handling is
    important, and it becomes more so in the face of nested language
    linkage specifications:<br>
    <br>
      <a href="http://llvm.org/bugs/show_bug.cgi?id=17337" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=17337</a><br>
    <br>
    The previous release of clang correctly accepted the code, just like
    every other C++ compiler, up until checking was added in r171139 /
    r181163 so this is a recent rejects-valid regression.<br></div></blockquote><div><br></div><div>If you can explain, with references to the standard, why you think we should inherit the language linkage, then I'll agree. As far as I can see, other compilers are getting this wrong. EDG rejects the code, just like we do. g++ and MSVC are known to have weak implementations of the language linkage rules.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
    clang r171139 states "The language linkage of redeclarations must
    match. GCC was already reporting an error for this."<br>
    <br>
    If you don't feel comfortable reviewing this patch could you give
    others a chance to take a look instead of marking the PR Invalid?<br>
    <br>
    * <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41020" target="_blank">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41020</a><div><div class="h5"><br>
    <br>
    <br>
    <br>
    <br>
    <div>On 24/09/2013 14:43, Richard Smith
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">On Tue, Sep 24, 2013 at 3:00 AM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span>
        wrote:<br>
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              The previous language linkage needs to be retained as
              described in<br>
              [class.friend]p3 otherwise valid friend redeclarations
              differing only in<br>
              lexical linkage are rejected.<br>
            </blockquote>
            <div><br>
            </div>
            <div>[class.friend]p3 says the previous linkage
              (internal/external/no linkage) is retained, not the
              previous language linkage. Our current behavior appears to
              be correct here.</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              Fixes PR17337.<br>
              <span><font color="#888888"><br>
                  --<br>
                  <a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
                  the browser experts<br>
                  <br>
                </font></span><br>
              _______________________________________________<br>
              cfe-commits mailing list<br>
              <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
              <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
              <br>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
    <pre cols="72">-- 
<a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a>
the browser experts
</pre>
  </div></div></div>

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