On Tue, Sep 24, 2013 at 9:14 AM, Alp Toker <[email protected]> wrote: > gcc and MSVC both intentionally* retain the language linkage, and they > accept both test cases in the PR. > > I already explained in PR17337 why this special handling is important, and > it becomes more so in the face of nested language linkage specifications: > > http://llvm.org/bugs/show_bug.cgi?id=17337 > > 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. >
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. clang r171139 states "The language linkage of redeclarations must match. > GCC was already reporting an error for this." > > 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? > > * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41020 > > > > > > On 24/09/2013 14:43, Richard Smith wrote: > > On Tue, Sep 24, 2013 at 3:00 AM, Alp Toker <[email protected]> wrote: > >> The previous language linkage needs to be retained as described in >> [class.friend]p3 otherwise valid friend redeclarations differing only in >> lexical linkage are rejected. >> > > [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. > > >> Fixes PR17337. >> >> -- >> http://www.nuanti.com >> the browser experts >> >> >> _______________________________________________ >> cfe-commits mailing list >> [email protected] >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >> >> > > -- http://www.nuanti.com > the browser experts > >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
