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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to