[LLVMbugs] [Bug 9114] New: Clang a bit too strict about types being complete

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 31 15:30:59 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=9114

           Summary: Clang a bit too strict about types being complete
           Product: clang
           Version: trunk
          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


The following code is accepted by gcc but rejected by clang. Uncommenting the
declaration of ~baz causes clang to accept it. Uncommenting the definition of
~baz causes gcc to reject it.

template <class T> struct foo   {
  T* p;
  ~foo()         {
    p->x();
  }
};
struct bar{
  virtual ~bar();
};
struct zed;
struct baz : public bar {
  virtual void x();
  //virtual ~baz();
  //virtual ~baz() {}
  foo<zed> m;
};
void f() {
  foo<baz> s;
}

-- 
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