cannot compile libgcj
Tom Tromey
tromey@cygnus.com
Thu Sep 9 16:58:00 GMT 1999
Per> java/lang/reflect/AccessibleObject.h:17: use of class template `template <class T> JArray<T>' as expression
Per> java/lang/reflect/AccessibleObject.h:17: parse error before `:'
Try the appended patch.
Per> I don't see anything obviously wrong with the gcjh-generated
Per> AccessibleObject.h, so my first inclination is to blame g++.
The problem is that JArray<foo> works but JArray<::foo> does not. It
seems to me that both should work, but when I looked through
Stroustrup I couldn't find words to this effect either way. I've more
or less given up trying to understand C++ in full.
I asked about this here but didn't get any sort of useful answer. I
also once saw this reported to egcs-bugs, but I didn't see a response
there either. Bummer.
Tom
Index: gjavah.c
===================================================================
RCS file: /cvs/egcs/egcs/gcc/java/gjavah.c,v
retrieving revision 1.34
diff -u -r1.34 gjavah.c
--- gjavah.c 1999/09/02 23:44:04 1.34
+++ gjavah.c 1999/09/09 23:54:06
@@ -726,7 +726,7 @@
/* We have to generate a reference to JArray here, so that
our output matches what the compiler does. */
++signature;
- fputs ("JArray<::", stream);
+ fputs ("JArray<", stream);
while (signature < limit && *signature != ';')
{
int ch = UTF8_GET (signature, limit);
More information about the Java
mailing list