bugs concerning operator delete (egcs-1.1.1)
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Thu Mar 9 01:50:00 GMT 2000
> An explicit call to a placement operator delete calls the wrong
> operator causing an unwanted recursive loop in the example below.
> Also the global-scope-operator "::" has no effect in some contexts.
> The behaviour described below is the same on Linux and HP-UX.
Thanks for your bug report. gcc-2.95.2 says
a.cc: In function `static void * A::operator new(unsigned int)':
a.cc:6: warning: operator new should throw an exception, not return NULL
a.cc: In function `static void A::operator delete(void *)':
a.cc:16: initialization of non-const reference type `struct B &'
a.cc:16: from rvalue of type `B'
a.cc:10: in passing argument 2 of `A::operator delete(void *, B &)'
After correcting this error, the compiler generates correct code, so
the bug appears to be fixed.
Regards,
Martin
More information about the Gcc-bugs
mailing list