[cfe-dev] using stmt + friend

Richard Smith richard at metafoo.co.uk
Thu Apr 10 18:11:25 PDT 2014


This was a Clang bug. Fixed in r206011.


On Fri, Mar 28, 2014 at 3:03 AM, Vassil Vassilev <
vasil.georgiev.vasilev at cern.ch> wrote:

> Hi,
> cat T.h
>
> namespace N {
>    struct A {
>       friend struct B;
>    };
> }
>
> namespace M {
>    struct B{};
> }
> namespace N {
>    using M::B;
> }
>
> If I compile this with clang (close to trunk) it is all good: clang
> -fsyntax-only -x c++ T.h
> If I compile it with gcc (4.8.1): g++ -fsyntax-only -x c++ T.h
> T.h:11:17: error: 'B' is already declared in this scope
>     using M::B;
>                  ^
> My question is if this is a bug in clang or in gcc (so that I know where
> to submit it to).
>
> Vassil
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140410/ad8c669e/attachment.html>


More information about the cfe-dev mailing list