This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: add 'extern "Java"'
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 22 Feb 2005 11:24:59 -0700
- Subject: Patch: FYI: add 'extern "Java"'
- Reply-to: tromey at redhat dot com
I'm checking this in.
This wraps _JvObjectPrefix in 'extern "Java"'. This is a necessary
step toward getting rid of all those annoying "virtual destructor"
warnings when building libgcj.
The next step is a g++ patch, which I have yet to run through the test
suite... soon.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* java/lang/Object.h (_JvObjectPrefix): Declare as extern "Java".
Index: java/lang/Object.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Object.h,v
retrieving revision 1.12
diff -u -r1.12 Object.h
--- java/lang/Object.h 18 Nov 2004 05:37:13 -0000 1.12
+++ java/lang/Object.h 22 Feb 2005 18:26:09 -0000
@@ -1,6 +1,6 @@
// Object.h - Header file for java.lang.Object. -*- c++ -*-
-/* Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005 Free Software Foundation
This file is part of libgcj.
@@ -15,6 +15,8 @@
#include <gcj/javaprims.h>
+extern "Java"
+{
// This class is mainly here as a kludge to get G++ to allocate two
// extra entries in each vtable.
struct _JvObjectPrefix
@@ -27,6 +29,7 @@
virtual void nacd_2 (void) {}; // Actually the GC bitmap marking descriptor.
# endif
};
+}
// Forward declarations for friends of java::lang::Object
void _Jv_MonitorEnter (jobject obj);