http://llvm.org/bugs/show_bug.cgi?id=13642
Bug #: 13642
Summary: friends mistake
Product: clang
Version: unspecified
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
#include <stdio.h>
class A {
//friend void c();
class B {
static int i;
friend void c();
};
};
void c() {
printf("%i \n", A::B::i);
}
I believe that this should be illegal. g++ says it's illegal but Clang allows
it.
If you uncomment the friend C definition in at the beginning of class A, then
g++ allows it.
--
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