[LLVMbugs] [Bug 8884] New: Surprising behavior with 'friend' and 'extern "C"'
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jan 1 17:17:40 PST 2011
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: unassignedclangbugs at nondot.org
ReportedBy: rafael.espindola at gmail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
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.
More information about the llvm-bugs
mailing list