From: Tom Tromey Date: Tue, 17 Sep 2002 20:59:53 +0000 (+0000) Subject: re PR java/7950 (jc1 parses files ending in 0x0d incorrectly) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a0225133cef7f6181a0b656e4952dadce25751b;p=gcc.git re PR java/7950 (jc1 parses files ending in 0x0d incorrectly) * lex.c (java_read_unicode_collapsing_terminators): Handle case where \r appears at EOF. Fixes PR java/7950. From-SVN: r57258 --- diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index e1eb6f14558..77612ee87ca 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2002-09-17 Tom Tromey + + * lex.c (java_read_unicode_collapsing_terminators): Handle case + where \r appears at EOF. Fixes PR java/7950. + 2002-09-16 Geoffrey Keating * java-tree.h (union lang_tree_node): Add chain_next option. diff --git a/gcc/java/lex.c b/gcc/java/lex.c index 026d3cacbd6..d8bcfd94e3f 100644 --- a/gcc/java/lex.c +++ b/gcc/java/lex.c @@ -599,7 +599,7 @@ java_read_unicode_collapsing_terminators (lex, unicode_escape_p) return a single line terminator. */ int dummy; c = java_read_unicode (lex, &dummy); - if (c != '\n') + if (c != '\n' && c != UEOF) lex->unget_value = c; /* In either case we must return a newline. */ c = '\n';