This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: inline operator delete redefinition and in-charge deleting destructor
- From: llewelly at xmission dot com
- To: Christian BRUEL <christian dot bruel at st dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 11 May 2004 22:08:02 -0600
- Subject: Re: inline operator delete redefinition and in-charge deleting destructor
- References: <40A0CE15.8F3CA05D@st.com>
Christian BRUEL <christian.bruel@st.com> writes:
> I have the following problem with gcc3.3.3 on Solaris:
>
> If providing the definition of a destructor outside the module where
> "delete" is called, the compiler instantiates a function call to delete
> to the standard library, thus missing my definition.
>
> See the following program:
>
> Of course, I comment out the "#include "new"" in ddef.cxx the
> program
'new' is a standard C++ library header. if you re-define it, the
behavior is undefined.
If you aren't trying to re-implemtn part of the C++ standard library,
you have no business naming a header file 'new'.
Otherwise, investigate -nostdinc++, see: http://xrl.us/b2qw
[snip]