GC_ALLOCATOR_THROW_OR_ABORT();
}
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__DMC__)
# if !defined(GC_NEW_DELETE_THROW_NOT_NEEDED) \
&& !defined(GC_NEW_DELETE_NEED_THROW) \
GC_NS_QUALIFY(GCCleanUpFunc), void*);
#endif
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__DMC__)
// The following ensures that the system default operator new[] does not
// get undefined, which is what seems to happen on VC++ 6 for some reason
// if we define a multi-argument operator new[].
// Inlining done to avoid mix up of new and delete operators by VC++ 9 (due
// to arbitrary ordering during linking).
-# if _MSC_VER > 1020
+# ifdef GC_OPERATOR_NEW_ARRAY
inline void* operator new[](size_t size)
{
void* obj = GC_MALLOC_UNCOLLECTABLE(size);
}
# endif /* !GC_DEBUG */
-# if _MSC_VER > 1020
+# ifdef GC_OPERATOR_NEW_ARRAY
// This new operator is used by VC++ 7+ in Debug builds:
inline void* operator new[](size_t size, int nBlockUse,
const char* szFileName, int nLine)