[LLVMbugs] [Bug 8328] New: Unable to call method of incomplete class
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Oct 7 07:33:27 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=8328
Summary: Unable to call method of incomplete class
Product: clang
Version: trunk
Platform: Other
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: yuri at tsoft.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Testcase below fails with the message: error: cannot dereference pointer into
incomplete class type 'D'
This is wrong. There is no problem in calling such method at all since the
class itself isn't used in the process.
Such pattern may be used by various projects and should compile fine. It works
in gcc.
rev.115483
--- testcase ---
class D;
typedef void (D::*Fn)();
void f(D *d, Fn fn) {
(d->*fn)();
}
--
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