[LLVMbugs] [Bug 6759] New: "friend class" implies forward declaration "class"?
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Apr 1 14:04:08 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6759
Summary: "friend class" implies forward declaration "class"?
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: jdd at efn.org
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
The following example will compile in g++ but not in clang++:
#include <stdio.h>
/* If you uncomment the forward declaration, then this compiles OK
(but g++ does not require the forward declaration):
*/
// class FooImpl;
class Foo_connection {
private:
friend class FooImpl;
Foo_connection(FooImpl&);
};
int main() {
int i = 1;
printf("%d \n",++i);
}
-----
clang++ testcase.cc -o testcase
testcase.cc:9:31: error: expected ')'
Foo_connection(FooImpl&);
^
--
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