This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bugs concerning operator delete (egcs-1.1.1)


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]