This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bugs concerning operator delete (egcs-1.1.1)
- To: aschiem at count dot math dot uni-sb dot de
- Subject: Re: bugs concerning operator delete (egcs-1.1.1)
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Thu, 9 Mar 2000 10:42:59 +0100
- CC: egcs-bugs at gcc dot cygnus dot com
- References: <199901051537.QAA09415@count.math.uni-sb.de>
> 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