This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: FYI: gcjh and PR 5365 again
- From: Tom Tromey <tromey at redhat dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 16 Jan 2002 14:32:10 -0700
- Subject: Patch: FYI: gcjh and PR 5365 again
- Reply-to: tromey at redhat dot com
I'm checking this in.
This changes gcjh so that the generated CNI stub files can be compiled
directly. After this goes in I'm going to close PR 5365.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
More for PR java/5365:
* gjavah.c (print_stub_or_jni): Cause exception to be thrown by
default.
(process_file): Generate include for
java.lang.UnsupportedOperationExceptions.
Index: gjavah.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/gjavah.c,v
retrieving revision 1.81
diff -u -r1.81 gjavah.c
--- gjavah.c 2002/01/16 00:27:05 1.81
+++ gjavah.c 2002/01/16 21:15:46
@@ -1503,12 +1503,13 @@
if (flag_jni)
fputs ("\n{\n (*env)->FatalError (\"", stream);
else
- fputs ("\n{\n JvFail (\"", stream);
+ fputs ("\n{\n throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 (\"", stream);
print_name_for_stub_or_jni (stream, jcf, name_index,
signature_index, is_init,
name_override,
flags);
- fputs (" not implemented\");\n}\n\n", stream);
+ fprintf (stream, " not implemented\")%s;\n}\n\n",
+ flag_jni ? "" : ")");
}
}
}
@@ -1982,7 +1983,11 @@
free (name);
if (! flag_jni)
- print_include (out, "gcj/cni", -1);
+ {
+ print_include (out, "gcj/cni", -1);
+ print_include (out, "java/lang/UnsupportedOperationException",
+ -1);
+ }
}
}