[cfe-dev] using stmt + friend

Vassil Vassilev vasil.georgiev.vasilev at cern.ch
Fri Apr 11 00:36:53 PDT 2014


Thanks!
On 04/11/2014 03:11 AM, Richard Smith wrote:
> 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 
> <mailto: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 <mailto: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/20140411/4f52ade8/attachment.html>


More information about the cfe-dev mailing list