[LLVMbugs] [Bug 5904] New: `operator delete' does not mean `delete'

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Dec 29 08:20:02 PST 2009


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

           Summary: `operator delete' does not mean `delete'
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: AST
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bolzoni at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu, bagnara at cs.unipr.it


- a.C ------<
class CString
{
public:
    CString();
    ~CString() { operator delete(_rep); }
    operator const char*() const { return _rep; }
private:
    CString(char* cstr);
    char* _rep;
};
------------>
This piece of code compiles well in gcc 4.4.2, but it does not in clang trunk.
$ clang-cc a.C
a.C:5:18: error: no matching function for call to 'operator delete'
    ~CString() { operator delete(_rep); }
                 ^~~~~~~~
1 diagnostic generated.

It is similar to bug #4782, but we are talking about the default delete.


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