This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Java: Fix bytecode parser
- To: gcc-patches at gcc dot gnu dot org
- Subject: Java: Fix bytecode parser
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Wed, 22 Nov 2000 15:15:46 +1300
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: