http://llvm.org/bugs/show_bug.cgi?id=8884
Summary: Surprising behavior with 'friend' and 'extern "C"'
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Clang rejects
----------
extern "C" {
//struct foo;
struct bar {
friend struct foo;
private:
void zed () const;
const struct foo& baz () const;
};
struct foo {
bar x;
void zed () const;
};
void foo::zed () const {
x.zed ();
}
}
----------
but any of the following makes it accept it:
*) Uncommenting the forward declaration of foo.
*) Removing the extern "C".
*) Commenting out the declaration of baz.
--
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