This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: inline operator delete redefinition and in-charge deleting destructor


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]


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