aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/test_cpp.cc
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@gcc.gnu.org>2000-04-19 11:10:01 +0100
committerBryce McKinlay <bryce@gcc.gnu.org>2000-04-19 11:10:01 +0100
commit93002327db5e5f466de60dc3f8c876cf9a56e183 (patch)
treefec69f60b37ca7ee4a47582f914dabbc7b3ee0c4 /boehm-gc/test_cpp.cc
parent5e787f078df8900b34981443e9f968fd5c3b039c (diff)
downloadgcc-93002327db5e5f466de60dc3f8c876cf9a56e183.zip
gcc-93002327db5e5f466de60dc3f8c876cf9a56e183.tar.gz
gcc-93002327db5e5f466de60dc3f8c876cf9a56e183.tar.bz2
Imported version version 5.0alpha6.
* acinclude.m4: Bump version to 5.0a6. * configure.in: Don't use alpha_mach_dep.s. * include/private/config.h, irix_threads.c gc_watcom.asm: Delete obsolete files. From-SVN: r33251
Diffstat (limited to 'boehm-gc/test_cpp.cc')
-rw-r--r--boehm-gc/test_cpp.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/boehm-gc/test_cpp.cc b/boehm-gc/test_cpp.cc
index 3160b09..0d45077 100644
--- a/boehm-gc/test_cpp.cc
+++ b/boehm-gc/test_cpp.cc
@@ -37,6 +37,12 @@ extern "C" {
#ifdef MSWIN32
# include <windows.h>
#endif
+#ifdef GC_NAME_CONFLICT
+# define USE_GC UseGC
+ struct foo * GC;
+#else
+# define USE_GC GC
+#endif
#define my_assert( e ) \
@@ -214,7 +220,7 @@ int APIENTRY WinMain(
for (i = 0; i < 1000; i++) {
C* c = new C( 2 );
C c1( 2 ); /* stack allocation should work too */
- D* d = ::new (GC, D::CleanUp, (void*) i) D( i );
+ D* d = ::new (USE_GC, D::CleanUp, (void*) i) D( i );
F* f = new F;
if (0 == i % 10) delete c;}
@@ -222,9 +228,9 @@ int APIENTRY WinMain(
drop the references to them immediately, forcing many
collections. */
for (i = 0; i < 1000000; i++) {
- A* a = new (GC) A( i );
+ A* a = new (USE_GC) A( i );
B* b = new B( i );
- b = new (GC) B( i );
+ b = new (USE_GC) B( i );
if (0 == i % 10) {
B::Deleting( 1 );
delete b;