This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: encode \0 in Java strings
- To: Egcs Patch List <egcs-patches at cygnus dot com>
- Subject: PATCH: encode \0 in Java strings
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 10 Feb 1999 16:06:58 -0700
- Reply-To: tromey at cygnus dot com
This patch changes the Java compiler to correctly handle \0 in a
string. I'm committing it.
1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* lex.c (yylex): Encode \0 as UTF8.
Tom
Index: lex.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/java/lex.c,v
retrieving revision 1.34.2.13
retrieving revision 1.34.2.14
diff -u -r1.34.2.13 -r1.34.2.14
--- lex.c 1999/02/10 03:35:48 1.34.2.13
+++ lex.c 1999/02/10 22:52:18 1.34.2.14
@@ -906,8 +906,7 @@
if (c == '\\')
c = java_parse_escape_sequence ();
no_error &= (c != JAVA_CHAR_ERROR ? 1 : 0);
- if (c)
- java_unicode_2_utf8 (c);
+ java_unicode_2_utf8 (c);
}
if (c == '\n' || c == UEOF) /* ULT */
{