diff options
author | Bryce McKinlay <mckinlay@redhat.com> | 2006-02-09 01:35:33 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2006-02-09 01:35:33 +0000 |
commit | 1349c6885196987a8a167b852ff5c482de834333 (patch) | |
tree | 726a8b9fcb5ec53a03add370b1409565ddac5505 /libjava/boehm.cc | |
parent | c03a2b6f6879703fbf0655399ba73c7780c63336 (diff) | |
download | gcc-1349c6885196987a8a167b852ff5c482de834333.tar.gz |
re PR libgcj/25187 (dereferencing type-punned pointer warnings while building libgcj)
2006-02-08 Bryce McKinlay <mckinlay@redhat.com>
PR libgcj/25187:
* gnu/gcj/io/natSimpleSHSStream.cc
(gnu::gcj::io::SimpleSHSStream::shsFinal): Remove bogus cast.
* interpret.cc (_Jv_InterpMethod::run): Simplify arguments to
_Jv_InterpFrame().
* boehm.cc: #undef some autoconf macros before including gc-config.h.
(_Jv_MarkObject): Don't mark the class, it is reachable via the vtable.
(_Jv_MarkArray): Likewise.
* java/lang/ref/natReference.cc (java::lang::ref::Reference::create):
Simplify _Jv_GCRegisterDisappearingLink() call.
* java/lang/Class.h (getComponentType): Use element_type.
(element_type): New field declaration, as a union with "methods".
* java/lang/natClassLoader.cc (_Jv_NewArrayClass): Use "element_type".
* java/net/natVMNetworkInterfacePosix.cc
(java::net::VMNetworkInterface::getInterfaces): Add "int" cast to
avoid sign comparison warning.
* include/java-interp.h (_Jv_InterpFrame): Take thread as second
argument, not parent call frame.
* include/x86_64-signal.h (MAKE_THROW_FRAME): Use "gregs" directly,
without a cast.
(restore_rt): Declare with hidden visibility, not "static".
* posix.cc (_Jv_platform_initProperties): Make "tmpdir" a string
constant.
* jni.cc (_Jv_JNI_DestroyJavaVM): Use a union to avoid strict alias
warning
From-SVN: r110783
Diffstat (limited to 'libjava/boehm.cc')
-rw-r--r-- | libjava/boehm.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libjava/boehm.cc b/libjava/boehm.cc index fc75bdb7005..7066e286b49 100644 --- a/libjava/boehm.cc +++ b/libjava/boehm.cc @@ -26,6 +26,12 @@ details. */ #undef TRUE #undef FALSE +// We include two autoconf headers. Avoid multiple definition warnings. +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION + extern "C" { #include <gc_config.h> @@ -93,9 +99,6 @@ _Jv_MarkObj (void *addr, void *msp, void *msl, void *env) p = (GC_PTR) obj->sync_info; MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, obj); # endif - // Mark the object's class. - p = (GC_PTR) klass; - MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, obj); if (__builtin_expect (klass == &java::lang::Class::class$, false)) { @@ -208,7 +211,6 @@ _Jv_MarkArray (void *addr, void *msp, void *msl, void *env) // we may need to round up the size. if (__builtin_expect (! dt || !(dt -> get_finalizer()), false)) return mark_stack_ptr; - jclass klass = dt->clas; GC_PTR p; p = (GC_PTR) dt; @@ -219,9 +221,6 @@ _Jv_MarkArray (void *addr, void *msp, void *msl, void *env) p = (GC_PTR) array->sync_info; MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, array); # endif - // Mark the object's class. - p = (GC_PTR) klass; - MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, &(dt -> clas)); for (int i = 0; i < JvGetArrayLength (array); ++i) { |