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]

Java: Fix bytecode parser


This patch:

2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>

        * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
        Create string in scratch buffer, then pass to build_string.

http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/jcf-parse.c.diff?r1=1.63&r2=1.64

broke gcj.

The following patch fixes it. ok to commit?

regards

  [ bryce ]


2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>

	* jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
	empty scratch buffer.

Index: jcf-parse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/jcf-parse.c,v
retrieving revision 1.64
diff -u -r1.64 jcf-parse.c
--- jcf-parse.c	2000/11/17 06:05:30	1.64
+++ jcf-parse.c	2000/11/22 02:06:25
@@ -358,7 +358,7 @@
 	for (i = 0; i < str_len; i++)
 	  {
 	    int char_value;
-	    int char_len = UT8_CHAR_LENGTH (*str);
+	    int char_len = UT8_CHAR_LENGTH (*utf8);
 	    switch (char_len)
 	      {
 	      case 1:

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