This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Conflicting JNI function decls


>>>>> "Danny" == Danny Smith <dannysmith@clear.net.nz> 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/jni.cc:
Danny> In function `java::lang::Object* _Jv_JNI_ToReflectedField(JNIEnv*,
Danny> java::lang::Class*, _Jv_Field*, jboolean)'
Danny> : ../../../gcc/libjava/jni.cc:1612: 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 Makefile.am -- 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.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]