http://llvm.org/bugs/show_bug.cgi?id=6885

           Summary: Diagnostic for friend declaration inside of a
                    namespace with same name
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


I don't know if this is valid but gcc accepts it:

hack:~ jason$ cat test.cpp 
namespace A {
    class B {
        friend class A;
    };
}

hack:~ jason$ clang++ test.cpp 
test.cpp:3:16: error: redefinition of 'A' as different kind of symbol
                friend class A;
                             ^
test.cpp:1:11: note: previous definition is here
namespace A {
          ^
1 error generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to