void operator delete(void *p) { } void foo () { void *p = new int; delete p; }
t.cxx: In function int main(): t.cxx:13: warning: deleting void* is undefined Oh yes it - I just defined it! It might be nice if the compiler checked before warning :) -- Summary: "warning: deleting void* is undefined" sometimes bogus Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: andrew dot stubbs at st dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32085