[m-dev.] diff: fix boehmgc problem with MSVC

Peter Ross peter.ross at miscrit.be
Fri Sep 29 21:55:14 AEDT 2000


Estimated hours taken: 0.25

Avoid the MSVC compiler error:
	gc_cpp.CPP(52) : error C2084: function 'void *__cdecl operator
	new[](unsigned int)' already has a body


boehgc/gc_cpp.cc:
	Don't include above definition if we are using MSVC compiler.

Index: gc_cpp.cc
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/gc_cpp.cc,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -u -r1.1.1.2 -r1.2
--- gc_cpp.cc	1999/07/14 23:47:08	1.1.1.2
+++ gc_cpp.cc	2000/09/29 10:48:31	1.2
@@ -48,6 +48,7 @@
 #endif
 
 #ifdef OPERATOR_NEW_ARRAY
+# ifdef _MSC_VER
 
 void* operator new[]( size_t size ) {
     return GC_MALLOC_UNCOLLECTABLE( size );}
@@ -55,6 +56,7 @@
 void operator delete[]( void* obj ) {
     GC_FREE( obj );}
 
+# endif
 #endif /* OPERATOR_NEW_ARRAY */
 
 
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list