Conflicting JNI function decls

Tom Tromey
Sun Aug 1 19:02:00 GMT 2004

>>>>> "Danny" == Danny Smith <> writes:

Danny> While testing a patch to fix PR c ++/15774 (Conflicting
Danny> function decls not diagnosed) I get this in libjava build.
Danny> ../../../gcc/libjava/
Danny> In function `java::lang::Object* _Jv_JNI_ToReflectedField(JNIEnv*,
Danny> java::lang::Class*, _Jv_Field*, jboolean)'
Danny> : ../../../gcc/libjava/ error: new declaration
Danny> `java::lang::Object* _Jv_JNI_ToReflectedField(JNIEnv*,
Danny> java::lang::Class*, _Jv_Field*, jboolean)'

This is just an oversight on our part.  These friend declarations are
added by some code in -- care to take a stab at fixing
them?  It might involve a little rearrangement since now Field.h will
probably need to refer to jni.h.

Danny> Perhaps, everything "just works" now .It seems that some of these are
Danny> also defined as extern inline (without attribute) in headers in the gcj
Danny> directory and so calling convention may be a non-issue.

I think the functions in gcj/field.h have subtly different names.  The
_JNI_ versions are part of our implementation of JNI.  The ones in
gcj/field.h are part of CNI.


More information about the Java mailing list