The following code (taken from ยง12.5 "Free Store" of the C++ Standards, with
some simplifications) fails to compile:

struct B
{
    virtual ~B() { } // line 5
    void operator delete(void*, size_t);
};

test.cpp:5: error: no suitable 'operator delete' for 'B'

(The code taken directly from the C++ standard without modification fails as
well)

if you remove the size_t parameter, it succeeds

This kind of code exists in KDE's khtml.


-- 
           Summary: gcc fails to compile code with operator
                    delete(void*,size_t)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: charles at kde dot org
  GCC host triplet: gcc version 4.1.2 20060601 (prerelease) (Debian 4.1.1-1)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27935

Reply via email to