X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=boehm-gc%2Fgc_cpp.cc;h=f8b803a8baa42a1f59583e48cd7120866be31090;hp=547c56f96a17c2df980fbc4d04fb123dd7a09920;hb=9bf5723dce955cb1210af9541787d03d9433cfd3;hpb=9bc8642e1f366a35c305b9abe9e01bf934b584b9 diff --git a/boehm-gc/gc_cpp.cc b/boehm-gc/gc_cpp.cc index 547c56f96a1..f8b803a8baa 100644 --- a/boehm-gc/gc_cpp.cc +++ b/boehm-gc/gc_cpp.cc @@ -32,22 +32,7 @@ void* operator new( size_t size ) { void operator delete( void* obj ) { GC_FREE( obj );} -#ifdef _MSC_VER -// This new operator is used by VC++ in case of Debug builds ! -void* operator new( size_t size, - int ,//nBlockUse, - const char * szFileName, - int nLine - ) { -# ifndef GC_DEBUG - return GC_malloc_uncollectable( size ); -# else - return GC_debug_malloc_uncollectable(size, szFileName, nLine); -# endif -} -#endif - -#ifdef OPERATOR_NEW_ARRAY +#ifdef GC_OPERATOR_NEW_ARRAY void* operator new[]( size_t size ) { return GC_MALLOC_UNCOLLECTABLE( size );} @@ -55,6 +40,22 @@ void* operator new[]( size_t size ) { void operator delete[]( void* obj ) { GC_FREE( obj );} -#endif /* OPERATOR_NEW_ARRAY */ +#endif /* GC_OPERATOR_NEW_ARRAY */ + +#ifdef _MSC_VER + +// This new operator is used by VC++ in case of Debug builds ! +void* operator new( size_t size, + int ,//nBlockUse, + const char * szFileName, + int nLine ) +{ +#ifndef GC_DEBUG + return GC_malloc_uncollectable( size ); +#else + return GC_debug_malloc_uncollectable(size, szFileName, nLine); +#endif +} +#endif /* _MSC_VER */