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
This commit is contained in:
parent
c03a2b6f68
commit
1349c68851
12 changed files with 65 additions and 29 deletions
|
@ -368,7 +368,7 @@ public:
|
|||
|
||||
inline jclass getComponentType (void)
|
||||
{
|
||||
return isArray () ? (* (jclass *) &methods) : 0;
|
||||
return isArray () ? element_type : 0;
|
||||
}
|
||||
|
||||
jboolean isAssignableFrom (jclass cls);
|
||||
|
@ -554,7 +554,11 @@ private:
|
|||
_Jv_Constants constants;
|
||||
// Methods. If this is an array class, then this field holds a
|
||||
// pointer to the element type.
|
||||
_Jv_Method *methods;
|
||||
union
|
||||
{
|
||||
_Jv_Method *methods;
|
||||
jclass element_type;
|
||||
};
|
||||
// Number of methods. If this class is primitive, this holds the
|
||||
// character used to represent this type in a signature.
|
||||
jshort method_count;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue