This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Patch: gcjh fixes


I'm checking in the appended patch for gcjh.  It does three things:

1. Works around an apparent g++ bug by changing how it generates class
   names in templates,
2. No longer prints a ";" after a namespace decl (somebody pointed out
   to me that this is not necessary), and
3. Changes to the correct #include for the header restructuring I'm
   about to check in to libgcj.

1999-09-07  Tom Tromey  <tromey@cygnus.com>

	* gjavah.c (add_class_decl): Generate include for gcj/array.h, not
	java-array.h.
	(decode_signature_piece): Don't emit "::" in JArray<>.
	(print_namelet): Only print trailing `;' when printing a class.

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/10 21:24:46
@@ -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);
@@ -1215,7 +1215,10 @@
 	{
 	  for (i = 0; i < depth; ++i)
 	    fputc (' ', out);
-	  fputs ("};\n", out);
+	  fputs ("}\n", out);
+	  /* Only print a `;' when printing a class.  C++ is evil.  */
+	  if (name->is_class)
+	    fputs (";", out);
 	}
 
       free (name->name);
@@ -1247,7 +1250,7 @@
       /* If we see an array, then we include the array header.  */
       if (s[i] == '[')
 	{
-	  print_include (out, "java-array", -1);
+	  print_include (out, "gcj/array", -1);
 	  continue;
 	}
 


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